it works, maybe service in the wrong place?

This commit is contained in:
2023-09-21 18:08:30 +02:00
parent 53e8ee2048
commit c4d91106b2
2 changed files with 12 additions and 11 deletions

View File

@@ -4,10 +4,11 @@ job "gitea" {
] ]
type = "service" type = "service"
group "gitea" { group "apps" {
count = 1 count = 1
network { network {
mode = "host"
port "http" { port "http" {
to = 3000 to = 3000
} }
@@ -18,6 +19,16 @@ job "gitea" {
} }
} }
service {
name = "gitea"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.gitea.rule=Host(`gitea.service.consul`)",
]
}
volume "gitea-data" { volume "gitea-data" {
type = "csi" type = "csi"
source = "gitea-data" source = "gitea-data"
@@ -69,15 +80,6 @@ job "gitea" {
memory = 512 memory = 512
} }
service {
name = "gitea"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.http.rule=Host(`gitea.service.consul`)",
]
}
} }
} }
} }

View File

@@ -43,7 +43,6 @@ job "postgres" {
cpu = 1000 cpu = 1000
memory = 1024 memory = 1024
network { network {
mbits = 10
port "db" { port "db" {
static = 5432 static = 5432
} }