db password stops working with secret
This commit is contained in:
@ -7,16 +7,15 @@ shift
|
||||
|
||||
echo "++ original entrypoint: ${ORIGINAL_ENTRYPOINT}"
|
||||
|
||||
# --- Load secrets into environment variables ---
|
||||
if [ -d /run/secrets ]; then
|
||||
for secret_file in /run/secrets/*; do
|
||||
echo "++ loading secret: ${secret_file}"
|
||||
var_name=$(basename "$secret_file" | tr '[:lower:]' '[:upper:]')
|
||||
export "$var_name"="$(cat "$secret_file")"
|
||||
done
|
||||
fi
|
||||
[ -f /run/secrets/postgres_password ] && export DB_PASSWORD="$(cat /run/secrets/postgres_password)"
|
||||
[ -f /run/secrets/django_secret_key ] && export DJANGO_SECRET_KEY="$(cat /run/secrets/django_secret_key)"
|
||||
[ -f /run/secrets/django_superuser_password ] && export DJANGO_SUPERUSER_PASSWORD="$(cat /run/secrets/django_superuser_password)"
|
||||
[ -f /run/secrets/oidc_rp_client_secret ] && export OIDC_RP_CLIENT_SECRET="$(cat /run/secrets/oidc_rp_client_secret)"
|
||||
[ -f /run/secrets/collaboration_server_secret ] && export COLLABORATION_SERVER_SECRET="$(cat /run/secrets/collaboration_server_secret)"
|
||||
|
||||
echo "++ command: ${@}"
|
||||
echo "++ env: "
|
||||
printenv
|
||||
|
||||
# --- Execute the original entrypoint and command ---
|
||||
if [ -n "$ORIGINAL_ENTRYPOINT" ] && [ "$ORIGINAL_ENTRYPOINT" != "null" ]; then
|
||||
|
||||
Reference in New Issue
Block a user