pgadmin config.

This commit is contained in:
2023-08-16 06:21:05 +01:00
parent 8480fa6277
commit 34f99cefaf

View File

@@ -9,6 +9,7 @@ job "postgres" {
port "exporter" { port "exporter" {
to = 9187 to = 9187
} }
port "admin" { }
} }
task "postgres" { task "postgres" {
@@ -59,6 +60,33 @@ job "postgres" {
tags = ["metrics"] tags = ["metrics"]
} }
} }
task "pgadmin" {
driver = "docker"
config {
image = "dpage/pgadmin4:latest"
ports = ["admin"]
volumes = [ "/data/compute/appdata/pgadmin:/var/lib/pgadmin" ]
}
env {
PGADMIN_LISTEN_PORT = "${NOMAD_PORT_admin}"
PGADMIN_DEFAULT_EMAIL = "${var.default_email}"
PGADMIN_DEFAULT_PASSWORD = "${var.default_password}"
PGADMIN_DISABLE_POSTFIX = "true"
PGADMIN_CONFIG_MAIL_SERVER = "'192.168.1.1'"
}
service {
name = "pgadmin"
port = "admin"
tags = [
"traefik.enable=true",
"traefik.http.routers.pgadmin.entryPoints=websecure",
]
}
}
} }
} }
@@ -66,3 +94,13 @@ variable "pg_password" {
type = string type = string
default = "Faelaishewohlees4nei" default = "Faelaishewohlees4nei"
} }
variable "default_email" {
type = string
default = "petru@paler.net"
}
variable "default_password" {
type = string
default = "ahheina6aeki3Hu0aht3"
}