diff --git a/Dockerfile b/Dockerfile index c75a9e0..1480671 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,9 @@ COPY . . RUN cd packages/database && npx prisma generate RUN pnpm turbo run build --filter=@relink/${APP_NAME} +# Ensure public directories exist for COPY +RUN mkdir -p /app/apps/${APP_NAME}/public + # --- Stage 3: Runner --- FROM node:20-alpine AS runner ARG APP_NAME=web @@ -44,9 +47,7 @@ RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs WORKDIR /app -# Ensure public dir exists (some apps may not have one) -RUN mkdir -p ./public -COPY --from=builder /app/apps/${APP_NAME}/public/ ./public/ +COPY --from=builder /app/apps/${APP_NAME}/public ./public COPY --from=builder --chown=nextjs:nodejs /app/apps/${APP_NAME}/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/apps/${APP_NAME}/.next/static ./apps/${APP_NAME}/.next/static