Get pgadmin loading the passfile
This commit is contained in:
parent
94db0be3ec
commit
c4a5caa587
1 changed files with 6 additions and 4 deletions
|
@ -182,6 +182,8 @@ spec:
|
||||||
- |
|
- |
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
mkdir -p /var/lib/pgadmin/storage/max_zed.dev
|
||||||
|
|
||||||
python3 - <<EOF
|
python3 - <<EOF
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
@ -200,15 +202,15 @@ spec:
|
||||||
"Username": url.username,
|
"Username": url.username,
|
||||||
"Host": url.hostname,
|
"Host": url.hostname,
|
||||||
"SSLMode": "require",
|
"SSLMode": "require",
|
||||||
"PassFile": "/pgadmin4/passfile",
|
"PassFile": "/passfile",
|
||||||
"MaintenanceDB": db,
|
"MaintenanceDB": db,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
with open("/pgadmin4/passfile", "w") as f:
|
with open("/var/lib/pgadmin/storage/max_zed.dev/passfile", "w") as f:
|
||||||
f.write(f"{url.hostname}:{url.port}:*:{url.username}:{url.password}\n")
|
f.write(f"*:*:*:*:{url.password}")
|
||||||
os.chmod("/pgadmin4/passfile", 0o600)
|
os.chmod("/var/lib/pgadmin/storage/max_zed.dev/passfile", 0o600)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
exec /entrypoint.sh
|
exec /entrypoint.sh
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue