diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-04-28 02:31:23 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-04-28 02:31:23 -0400 |
commit | 494fa52ca7464592be1caea3b5a8c86c0c0b16ee (patch) | |
tree | 5341cc33a967c5b5b7ed01f28ef7cdabfedd7239 | |
parent | 9a827f48971b9c21beb44063a11be62f7d5a07d7 (diff) | |
download | puppet-tozt-494fa52ca7464592be1caea3b5a8c86c0c0b16ee.tar.gz puppet-tozt-494fa52ca7464592be1caea3b5a8c86c0c0b16ee.zip |
move gitea to its own domain
this is going to take a bit to set up
-rw-r--r-- | manifests/tozt.pp | 2 | ||||
-rwxr-xr-x | modules/certbot/files/bootstrap-certbot | 4 | ||||
-rw-r--r-- | modules/tozt/files/nginx/gitea-tls.conf | 6 | ||||
-rw-r--r-- | modules/tozt/files/nginx/gitea.conf | 10 | ||||
-rw-r--r-- | modules/tozt/manifests/gitea.pp | 6 |
5 files changed, 19 insertions, 9 deletions
diff --git a/manifests/tozt.pp b/manifests/tozt.pp index 9271f33..aa9460e 100644 --- a/manifests/tozt.pp +++ b/manifests/tozt.pp @@ -14,7 +14,7 @@ node 'tozt', 'tozt.localdomain' { include tozt::backups include tozt::bitwarden - # include tozt::git + include tozt::git include tozt::gitea include tozt::metabase include tozt::monitoring diff --git a/modules/certbot/files/bootstrap-certbot b/modules/certbot/files/bootstrap-certbot index a90368f..9810791 100755 --- a/modules/certbot/files/bootstrap-certbot +++ b/modules/certbot/files/bootstrap-certbot @@ -91,7 +91,7 @@ if [ -z "$is_running" ]; then fi if [ -z "$config_dir" ]; then - /usr/bin/certbot -n --agree-tos -m doy@tozt.net --nginx -d tozt.net -d blog.tozt.net -d paste.tozt.net -d git.tozt.net -d rss.tozt.net -d munin.tozt.net -d metabase.tozt.net -d rc-teleterm.tozt.net -d bitwarden.tozt.net + /usr/bin/certbot -n --agree-tos -m doy@tozt.net --nginx -d tozt.net -d blog.tozt.net -d paste.tozt.net -d git.tozt.net -d rss.tozt.net -d munin.tozt.net -d metabase.tozt.net -d rc-teleterm.tozt.net -d bitwarden.tozt.net -d gitea.tozt.net else - /usr/bin/certbot -n --agree-tos -m doy@tozt.net --nginx -d tozt.net -d blog.tozt.net -d paste.tozt.net -d git.tozt.net -d rss.tozt.net -d munin.tozt.net -d metabase.tozt.net -d rc-teleterm.tozt.net -d bitwarden.tozt.net --config-dir "$config_dir" + /usr/bin/certbot -n --agree-tos -m doy@tozt.net --nginx -d tozt.net -d blog.tozt.net -d paste.tozt.net -d git.tozt.net -d rss.tozt.net -d munin.tozt.net -d metabase.tozt.net -d rc-teleterm.tozt.net -d bitwarden.tozt.net -d gitea.tozt.net --config-dir "$config_dir" fi diff --git a/modules/tozt/files/nginx/gitea-tls.conf b/modules/tozt/files/nginx/gitea-tls.conf index d58435a..53516e8 100644 --- a/modules/tozt/files/nginx/gitea-tls.conf +++ b/modules/tozt/files/nginx/gitea-tls.conf @@ -1,9 +1,9 @@ server { listen 443; - server_name git.tozt.net; + server_name gitea.tozt.net; - access_log /var/log/nginx/git.access.log; - error_log /var/log/nginx/git.error.log; + access_log /var/log/nginx/gitea.access.log; + error_log /var/log/nginx/gitea.error.log; include ssl; diff --git a/modules/tozt/files/nginx/gitea.conf b/modules/tozt/files/nginx/gitea.conf new file mode 100644 index 0000000..2a59f34 --- /dev/null +++ b/modules/tozt/files/nginx/gitea.conf @@ -0,0 +1,10 @@ +server { + listen 80; + server_name gitea.tozt.net; + + access_log /var/log/nginx/gitea.access.log; + error_log /var/log/nginx/gitea.error.log; + + rewrite ^(.*) https://$host$1 permanent; +} +# vim:ft=nginx diff --git a/modules/tozt/manifests/gitea.pp b/modules/tozt/manifests/gitea.pp index 4a2a6be..54d391c 100644 --- a/modules/tozt/manifests/gitea.pp +++ b/modules/tozt/manifests/gitea.pp @@ -4,10 +4,10 @@ class tozt::gitea { include tozt::persistent nginx::site { - "git-tls": + "gitea-tls": source => 'puppet:///modules/tozt/nginx/gitea-tls.conf', require => Class['certbot']; - "git": - source => 'puppet:///modules/tozt/nginx/git.conf'; + "gitea": + source => 'puppet:///modules/tozt/nginx/gitea.conf'; } } |