mirror of
https://github.com/luigieai/homelab.git
synced 2025-06-07 16:06:35 -03:00
infra: properly save pgadmin data
This commit is contained in:
parent
e067e6acd0
commit
ae51769685
3 changed files with 16 additions and 5 deletions
9
terraform/README.md
Normal file
9
terraform/README.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Common errors
|
||||||
|
|
||||||
|
## PGAdmin
|
||||||
|
Because of how pgadmin container works, you neeed to give permission to /alloc/pgadmin folder at nomad node so we can share our data between task allocations:
|
||||||
|
```shell
|
||||||
|
mkdir /alloc/pgadmin
|
||||||
|
sudo chown -R 5050:5050 /alloc/pgadmin
|
||||||
|
```
|
||||||
|
Source: https://www.pgadmin.org/docs/pgadmin4/8.1/container_deployment.html#mapped-files-and-directories
|
|
@ -27,15 +27,17 @@ job "pg_admin" {
|
||||||
image = "dpage/pgadmin4:latest"
|
image = "dpage/pgadmin4:latest"
|
||||||
#network_mode = "host"
|
#network_mode = "host"
|
||||||
volumes = [
|
volumes = [
|
||||||
"${NOMAD_ALLOC_DIR}/pgadmin/servers.json:/pgadmin4/servers.json",
|
"${NOMAD_ALLOC_DIR}/pgadmin:/var/lib/pgadmin"
|
||||||
"${NOMAD_ALLOC_DIR}/servers.passfile:/root/.pgpass",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
ports = ["pgadmin_port"]
|
ports = ["pgadmin_port"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
env {
|
env {
|
||||||
PGADMIN_DEFAULT_EMAIL="${PGADMIN_USER}"
|
PGADMIN_DEFAULT_EMAIL="${PGADMIN_USER}"
|
||||||
PGADMIN_DEFAULT_PASSWORD="${PGADMIN_PASSWORD}"
|
PGADMIN_DEFAULT_PASSWORD="${PGADMIN_PASSWORD}"
|
||||||
|
#PGADMIN_SERVER_JSON_FILE="/pgadmin4/serverslist/servers.json"
|
||||||
|
# PGADMIN_DEFAULT_PASSWORD_FILE="/pgadmin4/serverslist/passwords"
|
||||||
}
|
}
|
||||||
|
|
||||||
service {
|
service {
|
||||||
|
|
Loading…
Add table
Reference in a new issue