mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 14:37:34 +00:00
fix: fix login image (#10355)
# Which Problems Are Solved The broken login image is fixed. # How the Problems Are Solved The most important learnings from https://github.com/zitadel/zitadel/pull/10318 are applied: - Path in entrypoint is fixed: `exec node /runtime/apps/login/server.js` - .dockerignore is updated so CSS styles are built into the image - `source: .` is passed to the docker-bake action. Without this, docker-bake builds from a remote context, which seems to be slow and not updated on new PR commits. Looks like the bake action uploads an artifact that [conflicts with the compile workflow](https://github.com/zitadel/zitadel/actions/runs/16620417216/job/47023478437). Therefore, a pattern is added to the compile workflow so only relevant artifacts are selected.
This commit is contained in:
@@ -24,9 +24,9 @@ COPY . .
|
||||
RUN pnpm turbo build:login:standalone
|
||||
|
||||
FROM scratch AS build-out
|
||||
COPY --from=build /app/apps/login/.next/standalone /
|
||||
COPY --from=build /app/apps/login/.next/static /.next/static
|
||||
COPY --from=build /app/apps/login/public /public
|
||||
COPY /apps/login/public ./apps/login/public
|
||||
COPY --from=build /app/apps/login/.next/standalone ./
|
||||
COPY --from=build /app/apps/login/.next/static ./apps/login/.next/static
|
||||
|
||||
FROM base AS login-standalone
|
||||
WORKDIR /runtime
|
||||
@@ -34,7 +34,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 apps/login/scripts ./
|
||||
COPY --chown=nextjs:nodejs apps/login/scripts ./
|
||||
COPY --chown=nextjs:nodejs --from=build-out . .
|
||||
USER nextjs
|
||||
ENV HOSTNAME="0.0.0.0"
|
||||
|
@@ -8,7 +8,8 @@
|
||||
!apps/login/next.config.mjs
|
||||
!apps/login/next-env-vars.d.ts
|
||||
!apps/login/next-env.d.ts
|
||||
!apps/login/tailwind.config.js
|
||||
!apps/login/tailwind.config.mjs
|
||||
!apps/login/postcss.config.cjs
|
||||
!apps/login/tsconfig.json
|
||||
!apps/login/package.json
|
||||
!apps/login/turbo.json
|
||||
@@ -23,6 +24,7 @@
|
||||
!packages/zitadel-proto/turbo.json
|
||||
|
||||
!packages/zitadel-client/package.json
|
||||
!packages/zitadel-client/**/package.json
|
||||
!packages/zitadel-client/src
|
||||
!packages/zitadel-client/tsconfig.json
|
||||
!packages/zitadel-client/tsup.config.ts
|
||||
@@ -30,8 +32,7 @@
|
||||
|
||||
!proto
|
||||
|
||||
*.md
|
||||
*.png
|
||||
node_modules
|
||||
*.test.ts
|
||||
*.test.tsx
|
||||
**/*.md
|
||||
**/node_modules
|
||||
**/*.test.ts
|
||||
**/*.test.tsx
|
Reference in New Issue
Block a user