postgres refactoring and gitea health check
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user