High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
Use runtime env var for login page message to lower web container startup time (#577)
bo0tzz564ace3ddf56
diff --git a/docker/.env.example b/docker/.env.exampleindex 18c96c3534..be70ce5d11 100644--- a/docker/.env.example+++ b/docker/.env.example@@ -61,6 +61,6 @@ MAPBOX_KEY=##################################################################################### Custom message on the login page, should be written in HTML form.-# For example VITE_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>[email protected]</i><br>Password: <i>demo</i>"+# For example PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>[email protected]</i><br>Password: <i>demo</i>"-VITE_LOGIN_PAGE_MESSAGE=\ No newline at end of file+PUBLIC_LOGIN_PAGE_MESSAGE=\ No newline at end of filediff --git a/web/Dockerfile b/web/Dockerfileindex b5db9c9e81..9986b8fce6 100644--- a/web/Dockerfile+++ b/web/Dockerfile@@ -13,6 +13,8 @@ RUN npm ciCOPY --chown=node:node . .+RUN npm run build+EXPOSE 3000FROM base AS dev@@ -22,6 +24,3 @@ CMD ["npm", "run", "dev"]FROM base as prodENV NODE_ENV=production---# Issue build command in entrypoint.sh to capture user .env file instead of the builder .env file.diff --git a/web/entrypoint.sh b/web/entrypoint.shindex dc06f9b738..cabdaeb5d2 100644--- a/web/entrypoint.sh+++ b/web/entrypoint.sh@@ -1,4 +1,3 @@-npm run buildif [ `id -u` -eq 0 ] && [ -n "$PUID" ] && [ -n "$PGID" ]; thenexec setpriv --reuid $PUID --regid $PGID --clear-groups node /usr/src/app/build/index.jselsediff --git a/web/src/lib/constants.ts b/web/src/lib/constants.tsindex 7f09000e27..1cd049a622 100644--- a/web/src/lib/constants.ts+++ b/web/src/lib/constants.ts@@ -1 +1,2 @@-export const loginPageMessage: string = import.meta.env.VITE_LOGIN_PAGE_MESSAGE;+import { env } from '$env/dynamic/public';+export const loginPageMessage: string = env.PUBLIC_LOGIN_PAGE_MESSAGE;\ No newline at end of file