working with secrets

This commit is contained in:
2025-11-04 14:20:01 -05:00
parent 8bda1893f3
commit 761320788b
3 changed files with 7 additions and 13 deletions

View File

@ -1,12 +1,9 @@
#!/bin/sh
set -e
echo "++ running new entrypoint"
ORIGINAL_ENTRYPOINT="$1"
shift
echo "++ original entrypoint: ${ORIGINAL_ENTRYPOINT}"
[ -f /run/secrets/postgres_password ] && export DB_PASSWORD="$(cat /run/secrets/postgres_password)"
[ -f /run/secrets/postgres_password ] && export POSTGRES_PASSWORD="$(cat /run/secrets/postgres_password)"
[ -f /run/secrets/django_secret_key ] && export DJANGO_SECRET_KEY="$(cat /run/secrets/django_secret_key)"
@ -16,10 +13,6 @@ echo "++ original entrypoint: ${ORIGINAL_ENTRYPOINT}"
[ -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
exec "$ORIGINAL_ENTRYPOINT" "$@"