Add Gitea Service

This commit is contained in:
2024-02-06 13:01:22 -08:00
parent 77f6639929
commit ad8fd86bcb
2 changed files with 97 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
job "gitea" {
datacenters = ["dc1"]
type = "service"
group "application" {
count = 1
network {
mode = "bridge"
port "ingress" {
to = 3000
}
}
volume "gitea-data" {
type = "host"
source = "gitea-data"
}
service {
name = "postgres"
tags = ["traefik.enable=false"] # Hide envoy from traefik
connect {
sidecar_service {
proxy {
upstreams {
destination_name = "postgres"
local_bind_address = "127.0.0.1"
local_bind_port = 5432
}
}
tags = ["traefik.enable=false"] # Hide envoy from traefik
}
}
}
service {
name = "gitea"
port = "ingress"
tags = [
"traefik.enable=true",
"traefik.http.routers.gitea.tls=true",
"traefik.http.routers.gitea.entrypoints=websecure",
"traefik.http.routers.gitea.rule=Host(`git.example.local`)"
]
check {
type = "http"
path = "/"
interval = "10s"
timeout = "2s"
}
}
task "gitea" {
driver = "docker"
config {
image = "gitea/gitea:1.21.1"
ports = ["ingress"]
}
volume_mount {
volume = "gitea-data"
destination = "/data"
}
}
}
}