fix: disable image optimization to fix persistent 400 errors and simplify CI/CD
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 1m15s
Build & Deploy / 🏗️ Build (push) Successful in 3m2s
Build & Deploy / 🚀 Deploy (push) Successful in 15s
Build & Deploy / 🧪 Post-Deploy Verification (push) Failing after 1m4s
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-05-06 17:29:01 +02:00
parent ad3708e29e
commit 84da0e57e5
3 changed files with 8 additions and 12 deletions

View File

@@ -56,16 +56,15 @@ ENV UV_THREADPOOL_SIZE=3
RUN pnpm build RUN pnpm build
# Stage 2: Runner # Stage 2: Runner
FROM node:20-slim AS runner FROM node:20-alpine AS runner
WORKDIR /app WORKDIR /app
# Install curl for health checks and procps # Install dependencies for health checks and system compatibility
RUN apt-get update && apt-get install -y curl procps && rm -rf /var/lib/apt/lists/* RUN apk add --no-cache libc6-compat curl
# Create nextjs user and group # Create nextjs user and group
RUN groupadd --system --gid 1001 nodejs && \ RUN addgroup --system --gid 1001 nodejs && \
useradd --system --uid 1001 nextjs && \ adduser --system --uid 1001 nextjs && \
mkdir -p .next/cache/images && \
chown -R nextjs:nodejs /app chown -R nextjs:nodejs /app
USER nextjs USER nextjs
@@ -73,15 +72,11 @@ USER nextjs
ENV HOSTNAME="0.0.0.0" ENV HOSTNAME="0.0.0.0"
ENV PORT=3000 ENV PORT=3000
ENV NODE_ENV=production ENV NODE_ENV=production
ENV NEXT_SHARP_PATH=/app/node_modules/sharp
# Copy standalone output # Copy standalone output
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
# Copy public and static files - standalone expects them in specific locations # Copy public and static files
COPY --from=builder --chown=nextjs:nodejs /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
# Ensure cache directory is writable for the nextjs user
# (Already handled by chown -R above, but explicit is better)
CMD ["node", "server.js"] CMD ["node", "server.js"]

View File

@@ -402,6 +402,7 @@ const nextConfig = {
]; ];
}, },
images: { images: {
unoptimized: true,
formats: ['image/webp'], formats: ['image/webp'],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048], deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048],
remotePatterns: [ remotePatterns: [

View File

@@ -113,7 +113,7 @@
"prepare": "husky", "prepare": "husky",
"preinstall": "npx only-allow pnpm" "preinstall": "npx only-allow pnpm"
}, },
"version": "2.3.22-rc.16", "version": "2.3.22-rc.17",
"pnpm": { "pnpm": {
"onlyBuiltDependencies": [ "onlyBuiltDependencies": [
"@parcel/watcher", "@parcel/watcher",