PostgreSQL config.
This commit is contained in:
41
services/postgres.hcl
Normal file
41
services/postgres.hcl
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user