postgres refactoring and gitea health check

This commit is contained in:
2023-10-26 10:51:41 +02:00
parent 4410f69d37
commit 81561348e4
3 changed files with 27 additions and 20 deletions

View File

@@ -16,14 +16,28 @@ job "postgres" {
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
network {
mode = "host"
port "postgres"{
static = 5432
}
}
service {
name = "postgres"
port = "postgres"
tags = [
"traefik.enable=true",
"traefik.tcp.routers.postgres.rule=HostSNI('postgres.service.nr5')",
]
}
task "postgres" {
driver = "podman"
config {
image = "docker.io/postgres:13"
network_mode = "host"
port_map {
db = 5432
}
ports = ["postgres"]
}
volume_mount {
volume = "postgres-data"
@@ -42,24 +56,9 @@ job "postgres" {
resources {
cpu = 1000
memory = 1024
network {
port "db" {
static = 5432
}
}
}
service {
name = "postgres"
tags = ["postgres for vault"]
port = "db"
check {
name = "alive"
type = "tcp"
interval = "60s"
timeout = "2s"
}
}
}
restart {
attempts = 10