2022-12-29 22:49:02 +02:00
|
|
|
#! /bin/sh
|
2023-01-20 18:36:13 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2023-03-22 22:46:30 +02:00
|
|
|
export PROTOCOL_HEADER=X-Forwarded-Proto
|
|
|
|
|
2022-12-29 22:49:02 +02:00
|
|
|
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
|
2022-07-13 14:42:00 +02:00
|
|
|
else
|
2022-12-29 22:49:02 +02:00
|
|
|
exec node /usr/src/app/build/index.js
|
|
|
|
fi
|