Add Gitea Service
This commit is contained in:
71
nomad_jobs/services/gitea/gitea.nomad.hcl
Normal file
71
nomad_jobs/services/gitea/gitea.nomad.hcl
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user