From 9b749316ffeea439ff119759e7c7c3fc5e54f4b1 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Mon, 28 Aug 2023 20:34:25 -0400 Subject: [PATCH] roles/caddy: added gitea config --- roles/caddy/defaults/main.yml | 2 ++ roles/caddy/templates/Caddyfile.j2 | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/roles/caddy/defaults/main.yml b/roles/caddy/defaults/main.yml index ce6508b..f32c03f 100644 --- a/roles/caddy/defaults/main.yml +++ b/roles/caddy/defaults/main.yml @@ -5,3 +5,5 @@ # web root directory website_path: /srv/http + +gitea_domain: "git.{{ domain }}" diff --git a/roles/caddy/templates/Caddyfile.j2 b/roles/caddy/templates/Caddyfile.j2 index b53f622..f54dd27 100644 --- a/roles/caddy/templates/Caddyfile.j2 +++ b/roles/caddy/templates/Caddyfile.j2 @@ -4,3 +4,9 @@ www.{{ domain }} { file_server } {% endif %} + +{% if groups["gitea"] %} +{{ gitea_domain }} { + reverse_proxy {{ groups["gitea"][0] }}:3000 +} +{% endif %}