Refactor Gitea to Set Domain At Top Of File

This commit is contained in:
2024-02-28 16:26:55 -08:00
parent 49a25fff41
commit 16bb096e34
2 changed files with 10 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
locals {
SUBDOMAIN = "git." // End with dot or leave blamk for root domain
DOMAIN = "example.local"
TRAEFIK_DOMAIN = "${local.SUBDOMAIN}${local.DOMAIN}"
}
job "gitea" {
datacenters = ["dc1"]
type = "service"
@@ -38,7 +44,7 @@ job "gitea" {
"traefik.enable=true",
"traefik.http.routers.gitea.tls=true",
"traefik.http.routers.gitea.entrypoints=websecure",
"traefik.http.routers.gitea.rule=Host(`git.example.local`)"
"traefik.http.routers.gitea.rule=Host(`${local.TRAEFIK_DOMAIN}`)"
]
check {