summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/tozt.pp2
-rwxr-xr-xmodules/certbot/files/bootstrap-certbot4
-rw-r--r--modules/tozt/files/nginx/gitea-tls.conf6
-rw-r--r--modules/tozt/files/nginx/gitea.conf10
-rw-r--r--modules/tozt/manifests/gitea.pp6
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';
}
}