PostgreSQL config.

This commit is contained in:
2023-08-14 15:37:32 +01:00
parent 7e506557f6
commit e6c6f45e25

41
services/postgres.hcl Normal file
View File

@@ -0,0 +1,41 @@
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
}
}
}
}