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
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:
17
Dockerfile
17
Dockerfile
@@ -56,16 +56,15 @@ ENV UV_THREADPOOL_SIZE=3
|
||||
RUN pnpm build
|
||||
|
||||
# Stage 2: Runner
|
||||
FROM node:20-slim AS runner
|
||||
FROM node:20-alpine AS runner
|
||||
WORKDIR /app
|
||||
|
||||
# Install curl for health checks and procps
|
||||
RUN apt-get update && apt-get install -y curl procps && rm -rf /var/lib/apt/lists/*
|
||||
# Install dependencies for health checks and system compatibility
|
||||
RUN apk add --no-cache libc6-compat curl
|
||||
|
||||
# Create nextjs user and group
|
||||
RUN groupadd --system --gid 1001 nodejs && \
|
||||
useradd --system --uid 1001 nextjs && \
|
||||
mkdir -p .next/cache/images && \
|
||||
RUN addgroup --system --gid 1001 nodejs && \
|
||||
adduser --system --uid 1001 nextjs && \
|
||||
chown -R nextjs:nodejs /app
|
||||
|
||||
USER nextjs
|
||||
@@ -73,15 +72,11 @@ USER nextjs
|
||||
ENV HOSTNAME="0.0.0.0"
|
||||
ENV PORT=3000
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_SHARP_PATH=/app/node_modules/sharp
|
||||
|
||||
# Copy standalone output
|
||||
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/.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"]
|
||||
|
||||
@@ -402,6 +402,7 @@ const nextConfig = {
|
||||
];
|
||||
},
|
||||
images: {
|
||||
unoptimized: true,
|
||||
formats: ['image/webp'],
|
||||
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048],
|
||||
remotePatterns: [
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
"prepare": "husky",
|
||||
"preinstall": "npx only-allow pnpm"
|
||||
},
|
||||
"version": "2.3.22-rc.16",
|
||||
"version": "2.3.22-rc.17",
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"@parcel/watcher",
|
||||
|
||||
Reference in New Issue
Block a user