diff --git a/infrastructure/docker/Dockerfile.web b/infrastructure/docker/Dockerfile.web index d5d2fe4ac..1f7145856 100644 --- a/infrastructure/docker/Dockerfile.web +++ b/infrastructure/docker/Dockerfile.web @@ -53,13 +53,10 @@ FROM nginx:alpine AS runner ARG APP_PATH COPY infrastructure/nginx/spa.conf /etc/nginx/conf.d/default.conf -# Copy Next.js build output if it exists -RUN if [ -d "/app/${APP_PATH}/.next" ]; then \ - COPY --from=builder /app/${APP_PATH}/.next /usr/share/nginx/html/.next && \ - COPY --from=builder /app/${APP_PATH}/public /usr/share/nginx/html/public 2>/dev/null || true; \ - else \ - COPY --from=builder /app/${APP_PATH}/dist /usr/share/nginx/html; \ - fi +# Copy Next.js or Vite build output from builder stage +COPY --from=builder /app/${APP_PATH}/.next /usr/share/nginx/html/.next +COPY --from=builder /app/${APP_PATH}/public /usr/share/nginx/html/public +COPY --from=builder /app/${APP_PATH}/dist /usr/share/nginx/html/dist EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]