homelab/terraform-home/modules/postgreeSQL/conf/pgadmin.hcl

56 lines
1 KiB
HCL
Raw Normal View History

2023-12-04 22:29:52 -03:00
job "pg_admin" {
datacenters = ["dc"]
type = "service"
group "pg_admin" {
count = 1
network {
port "pgadmin_port" {
static = 8090
to = 80
}
}
restart {
attempts = 2
interval = "5m"
delay = "30s"
mode = "delay"
}
task "pg_admin" {
driver = "docker"
config {
image = "dpage/pgadmin4:latest"
#network_mode = "host"
volumes = [
2023-12-30 23:21:05 -03:00
"${NOMAD_ALLOC_DIR}/pgadmin:/var/lib/pgadmin"
2023-12-04 22:29:52 -03:00
]
ports = ["pgadmin_port"]
}
2023-12-30 23:21:05 -03:00
2023-12-04 22:29:52 -03:00
env {
PGADMIN_DEFAULT_EMAIL="${PGADMIN_USER}"
PGADMIN_DEFAULT_PASSWORD="${PGADMIN_PASSWORD}"
2023-12-30 23:21:05 -03:00
#PGADMIN_SERVER_JSON_FILE="/pgadmin4/serverslist/servers.json"
# PGADMIN_DEFAULT_PASSWORD_FILE="/pgadmin4/serverslist/passwords"
2023-12-04 22:29:52 -03:00
}
service {
name = "pgadmin"
port = "pgadmin_port"
provider = "nomad"
}
logs {
max_files = 5
max_file_size = 15
}
}
}
}