This commit is contained in:
kento2 2026-08-16 00:26:34 +02:00
commit dede9ce18d
21 changed files with 485 additions and 0 deletions

45
jobs/postgresql.nomad.hcl Normal file
View file

@ -0,0 +1,45 @@
job "postgres" {
datacenters = ["dc1"]
type = "service"
group "db" {
network {
mode = "host"
port "postgres" {
to = 5432
}
}
task "postgres" {
driver = "docker"
config {
image = "postgres:18-alpine"
ports = ["postgres"]
}
env {
POSTGRES_USER = "postgres"
POSTGRES_DB = "scrow"
POSTGRES_HOST_AUTH_METHOD = "trust"
}
resources {
cpu = 500
memory = 512
}
service {
name = "postgres"
port = "postgres"
provider = "consul"
check {
type = "tcp"
interval = "10s"
timeout = "1s"
}
}
}
}
}