.
This commit is contained in:
commit
dede9ce18d
21 changed files with 485 additions and 0 deletions
45
jobs/postgresql.nomad.hcl
Normal file
45
jobs/postgresql.nomad.hcl
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue