working on nginx.conf.tmpl

This commit is contained in:
notplants
2025-11-05 11:29:51 -05:00
parent 761320788b
commit 82ca119cdb
5 changed files with 25 additions and 39 deletions

View File

@ -1,11 +1,8 @@
#!/bin/sh
set -e
ORIGINAL_ENTRYPOINT="$1"
shift
[ -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/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)"
[ -f /run/secrets/minio_root_password ] && export MINIO_ROOT_PASSWORD="$(cat /run/secrets/minio_root_password)"
[ -f /run/secrets/minio_root_password ] && export AWS_S3_SECRET_ACCESS_KEY="$(cat /run/secrets/minio_root_password)"
@ -13,9 +10,13 @@ shift
[ -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)"
# --- Execute the original entrypoint and command ---
if [ -n "$ORIGINAL_ENTRYPOINT" ] && [ "$ORIGINAL_ENTRYPOINT" != "null" ]; then
exec "$ORIGINAL_ENTRYPOINT" "$@"
else
exec "$@"
fi
# if not in "env" mode, then execute the original entrypoint and command
if [ ! "$1" = "-e" ]; then
ORIGINAL_ENTRYPOINT="$1"
shift
if [ -n "$ORIGINAL_ENTRYPOINT" ] && [ "$ORIGINAL_ENTRYPOINT" != "null" ]; then
exec "$ORIGINAL_ENTRYPOINT" "$@"
else
exec "$@"
fi
fi