gitea finished
This commit is contained in:
@@ -1,7 +1,35 @@
|
|||||||
{#
|
|
||||||
vim /etc/apache2/conf.d/userdata/std/2/keiran5/git.keiran.us/git.keiran.us.conf
|
{{ salt.pillar.get('gitea:cpapache_include') }}:
|
||||||
/scripts/verify_vhost_includes --commit /scripts/ensure_vhost_includes --all-users
|
file.managed:
|
||||||
/scripts/rebuildhttpdconf
|
- source: 'salt://gitea/files/vhost_include.jinja'
|
||||||
/usr/local/cpanel/scripts/restartsrv_httpd --graceful
|
- template: jinja
|
||||||
go to http://git.keiran.us/install
|
- user: root
|
||||||
#}
|
- group: root
|
||||||
|
- mode: 644
|
||||||
|
|
||||||
|
verify_vhost_includes:
|
||||||
|
cmd.wait:
|
||||||
|
- name: /usr/local/cpanel/scripts/verify_vhost_includes --commit /scripts/ensure_vhost_includes --all-users
|
||||||
|
- watch:
|
||||||
|
- file: {{ salt.pillar.get('gitea:cpapache_include') }}
|
||||||
|
|
||||||
|
rebuildhttpdconf:
|
||||||
|
cmd.wait:
|
||||||
|
- name: /usr/local/cpanel/scripts/rebuildhttpdconf
|
||||||
|
- watch:
|
||||||
|
- cmd: verify_vhost_includes
|
||||||
|
|
||||||
|
queue_httpd_graceful:
|
||||||
|
cmd.wait:
|
||||||
|
- name: /usr/local/cpanel/scripts/restartsrv_httpd --graceful
|
||||||
|
- watch:
|
||||||
|
- cmd: rebuildhttpdconf
|
||||||
|
|
||||||
|
/home/{{ salt.pillar.get('gitea:user') }}/public_html/.htaccess:
|
||||||
|
file.managed:
|
||||||
|
- source: 'salt://gitea/files/htaccess.jinja'
|
||||||
|
- template: jinja
|
||||||
|
- user: {{ salt.pillar.get('gitea:user') }}
|
||||||
|
- group: {{ salt.pillar.get('gitea:user') }}
|
||||||
|
- mode: 644
|
||||||
|
|
||||||
|
|||||||
3
gitea/files/htaccess.jinja
Normal file
3
gitea/files/htaccess.jinja
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{SERVER_PORT} 80
|
||||||
|
RewriteRule ^(.*)$ https://{{ pillar['gitea']['domain'] }}/$1 [R,L]
|
||||||
6
gitea/files/vhost_include.jinja
Normal file
6
gitea/files/vhost_include.jinja
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
SecRuleEngine Off
|
||||||
|
ProxyRequests Off
|
||||||
|
ProxyFCGISetEnvIf "true" PATH_INFO "%{reqenv:SCRIPT_NAME}"
|
||||||
|
ProxyFCGISetEnvIf "true" !SCRIPT_NAME
|
||||||
|
ProxyPass /.well-known !
|
||||||
|
ProxyPass / "http://localhost:3000/" enablereuse=on
|
||||||
@@ -3,3 +3,11 @@ include:
|
|||||||
- gitea.install
|
- gitea.install
|
||||||
- gitea.systemd
|
- gitea.systemd
|
||||||
- gitea.cpapache
|
- gitea.cpapache
|
||||||
|
|
||||||
|
{#
|
||||||
|
= Manual steps needed afterwards =
|
||||||
|
1. set INSTALL_LOCK to false in /home/USER/gitea/etc/app.ini
|
||||||
|
2. go to http://git.keiran.us/install, setup DBs
|
||||||
|
3. run salt again
|
||||||
|
#}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user