mirror of
https://github.com/luigieai/homelab.git
synced 2025-06-06 15:46: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
|
|
@ -25,8 +25,8 @@ module "keycloak" {
|
|||
postgree_user = var.postgree_user
|
||||
postgree_password = var.postgree_password
|
||||
postgree_endpoint = var.endpoint
|
||||
KC_USER = var.kc_user
|
||||
KC_PASSWORD = var.kc_password
|
||||
KC_USER = var.kc_user
|
||||
KC_PASSWORD = var.kc_password
|
||||
providers = {
|
||||
nomad = nomad
|
||||
}
|
||||
|
|
|
@ -27,15 +27,17 @@ job "pg_admin" {
|
|||
image = "dpage/pgadmin4:latest"
|
||||
#network_mode = "host"
|
||||
volumes = [
|
||||
"${NOMAD_ALLOC_DIR}/pgadmin/servers.json:/pgadmin4/servers.json",
|
||||
"${NOMAD_ALLOC_DIR}/servers.passfile:/root/.pgpass",
|
||||
"${NOMAD_ALLOC_DIR}/pgadmin:/var/lib/pgadmin"
|
||||
]
|
||||
|
||||
ports = ["pgadmin_port"]
|
||||
}
|
||||
|
||||
|
||||
env {
|
||||
PGADMIN_DEFAULT_EMAIL="${PGADMIN_USER}"
|
||||
PGADMIN_DEFAULT_PASSWORD="${PGADMIN_PASSWORD}"
|
||||
#PGADMIN_SERVER_JSON_FILE="/pgadmin4/serverslist/servers.json"
|
||||
# PGADMIN_DEFAULT_PASSWORD_FILE="/pgadmin4/serverslist/passwords"
|
||||
}
|
||||
|
||||
service {
|
||||
|
|
Loading…
Add table
Reference in a new issue