42 lines
677 B
HCL
42 lines
677 B
HCL
job "postgres" {
|
|
datacenters = ["alo"]
|
|
|
|
group "db" {
|
|
network {
|
|
port "db" {
|
|
to = 5432
|
|
}
|
|
}
|
|
|
|
task "postgres" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "postgres:15-alpine"
|
|
ports = ["db"]
|
|
volumes = [ "/data/compute/appdata/postgres:/var/lib/postgresql/data" ]
|
|
}
|
|
|
|
env {
|
|
POSTGRES_PASSWORD = "Faelaishewohlees4nei"
|
|
}
|
|
|
|
service {
|
|
name = "postgres"
|
|
port = "db"
|
|
check {
|
|
type = "tcp"
|
|
port = "db"
|
|
interval = "30s"
|
|
timeout = "2s"
|
|
}
|
|
}
|
|
|
|
resources {
|
|
cpu = 1000
|
|
memory = 512
|
|
}
|
|
}
|
|
}
|
|
}
|