mirror of
https://github.com/immich-app/immich.git
synced 2024-12-28 22:51:59 +00:00
Use runtime env var for login page message to lower web container startup time (#577)
* Use runtime env var for loginPageMessage * Rename VITE_LOGIN_PAGE_MESSAGE to PUBLIC_LOGIN_PAGE_MESSAGE in .env.example * Move docker image `npm run build` step into Dockerfile * Remove comment from web Dockerfile
This commit is contained in:
parent
a81ef7497c
commit
564ace3ddf
4 changed files with 6 additions and 7 deletions
|
@ -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>demo@demo.de</i><br>Password: <i>demo</i>"
|
||||
# For example PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>"
|
||||
|
||||
VITE_LOGIN_PAGE_MESSAGE=
|
||||
PUBLIC_LOGIN_PAGE_MESSAGE=
|
|
@ -13,6 +13,8 @@ RUN npm ci
|
|||
|
||||
COPY --chown=node:node . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
FROM base AS dev
|
||||
|
@ -22,6 +24,3 @@ CMD ["npm", "run", "dev"]
|
|||
|
||||
FROM base as prod
|
||||
ENV NODE_ENV=production
|
||||
|
||||
|
||||
# Issue build command in entrypoint.sh to capture user .env file instead of the builder .env file.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
npm run build
|
||||
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
|
||||
|
|
|
@ -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;
|
Loading…
Reference in a new issue