From f7685fdb2f91a38359a9eae16a91153da765c405 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 9 Feb 2026 12:33:16 +0100 Subject: [PATCH] fix: deploy --- Dockerfile | 8 +++++++- docker-compose.yaml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d9b5df..b4f8d17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,13 +38,19 @@ RUN pnpm build # Production runner image FROM registry.infra.mintel.me/mintel/runtime:latest AS runner -WORKDIR /app +# Production environment configuration +ENV HOSTNAME="0.0.0.0" +ENV PORT=3000 +ENV NODE_ENV=production # Copy standalone output and static files COPY --from=builder --chown=nextjs:nodejs /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static +# Ensure the cache directory specifically is writeable (Mintel Standard #16) +RUN mkdir -p .next/cache && chown -R nextjs:nodejs .next/cache + USER nextjs CMD ["node", "server.js"] diff --git a/docker-compose.yaml b/docker-compose.yaml index fd99853..818db44 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -28,7 +28,7 @@ services: - "traefik.http.middlewares.${PROJECT_NAME}-auth.forwardauth.authResponseHeaders=X-Auth-User" - "traefik.docker.network=infra" healthcheck: - test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health" ] + test: [ "CMD", "node", "-e", "fetch('http://127.0.0.1:3000/api/health').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))" ] interval: 10s timeout: 5s retries: 5