pat from file

This commit is contained in:
Elio Bischof
2025-06-29 11:05:57 +02:00
parent de1e33c343
commit 4fbfe82bc2
6 changed files with 22 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
.changeset/
.github/
dist/
standalone/
packages/zitadel-proto/google
packages/zitadel-proto/protoc-gen-openapiv2
packages/zitadel-proto/validate

View File

@@ -2,7 +2,10 @@
!apps/login
apps/login/.next
apps/login/dist
apps/login/screenshots
apps/login/standalone
apps/login/.env*.local
!apps/login-test-integration

View File

@@ -20,6 +20,7 @@ RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs
# If /.env-file/.env is mounted into the container, its variables are made available to the server before it starts up.
RUN mkdir -p /.env-file && touch /.env-file/.env && chown -R nextjs:nodejs /.env-file
COPY ./scripts/entrypoint.sh ./
COPY ./scripts/healthcheck.js ./
COPY --chown=nextjs:nodejs --from=login-standalone-builder /build/docker/apps/login/.next/standalone ./
COPY --chown=nextjs:nodejs --from=login-standalone-builder /build/docker/apps/login/.next/static ./apps/login/.next/static
@@ -30,4 +31,4 @@ ENV PORT=3000
# TODO: Check healthy, not ready
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD ["/bin/sh", "-c", "node ./healthcheck.js http://localhost:${PORT}/ui/v2/login/healthy"]
CMD ["/bin/sh", "-c", "set -o allexport && . /.env-file/.env && set +o allexport && node apps/login/server.js"]
ENTRYPOINT ["./entrypoint.sh"]

View File

@@ -3,8 +3,11 @@
!apps/login
apps/login/.next
apps/login/dist
apps/login/screenshots
apps/login/standalone
apps/login/.env*.local
!scripts/entrypoint.sh
!scripts/healthcheck.js
!packages/zitadel-tailwind-config

View File

@@ -2,7 +2,10 @@
!apps/login
apps/login/.next
apps/login/dist
apps/login/screenshots
apps/login/standalone
apps/login/.env*.local
**/*.md
**/*.png

10
scripts/entrypoint.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
set -o allexport
. /.env-file/.env
set +o allexport
if [ -n "${ZITADEL_SERVICE_USER_TOKEN_PATH}" ] && [ -f "${ZITADEL_SERVICE_USER_TOKEN_PATH}" ]; then
export ZITADEL_SERVICE_USER_TOKEN=$(cat "${ZITADEL_SERVICE_USER_TOKEN_PATH}")
fi
exec node apps/login/server.js