diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index adffde2..5f1d607 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -27,12 +27,11 @@ ENV NEXT_TELEMETRY_DISABLED=1 ENV HOSTNAME=0.0.0.0 ENV PORT=3000 -# Ensure public dir exists (may be empty) then copy Next.js standalone output -# In monorepo, standalone outputs to: .next/standalone/ (root with node_modules) -# and .next/standalone/apps/web/ (server.js + .next/) +# Copy Next.js standalone output +# In monorepo with `cd apps/web && next build`, standalone contains: +# .next/standalone/ → root with server.js + node_modules/ + package.json RUN mkdir -p ./public -COPY --from=build --chown=node:node /app/apps/web/.next/standalone/node_modules ./node_modules -COPY --from=build --chown=node:node /app/apps/web/.next/standalone/apps/web ./ +COPY --from=build --chown=node:node /app/apps/web/.next/standalone ./ COPY --from=build --chown=node:node /app/apps/web/.next/static ./.next/static # Copy public assets if any exist (may be empty) COPY --from=build --chown=node:node /app/apps/web/public ./public