diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index bc6f4698b..ea25ff065 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -51,10 +51,6 @@ services: entrypoint: ["/bin/sh", "./entrypoint.sh"] env_file: - .env - environment: - # Rename these values for svelte public interface - - PUBLIC_IMMICH_SERVER_URL=${IMMICH_SERVER_URL} - - PUBLIC_IMMICH_API_URL_EXTERNAL=${IMMICH_API_URL_EXTERNAL} restart: always redis: diff --git a/web/entrypoint.sh b/web/entrypoint.sh index b9c9d6672..5f52b7b5f 100644 --- a/web/entrypoint.sh +++ b/web/entrypoint.sh @@ -1,4 +1,9 @@ #! /bin/sh + +# Rebind env vars to PUBLIC_ for svelte +export PUBLIC_IMMICH_SERVER_URL=$IMMICH_SERVER_URL +export PUBLIC_IMMICH_API_URL_EXTERNAL=$IMMICH_API_URL_EXTERNAL + if [ "$(id -u)" -eq 0 ] && [ -n "$PUID" ] && [ -n "$PGID" ]; then exec setpriv --reuid "$PUID" --regid "$PGID" --clear-groups node /usr/src/app/build/index.js else