fix: Fix Docker build for public directory
- Update Dockerfile to ensure public directory exists in builder stage - Use 'COPY /app/public/. ./public/' pattern for robust copying - Add manifest.json to public folder (non-empty directory) - Remove .gitkeep placeholder 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7dc7100fb8
commit
60493cfbdd
|
|
@ -19,6 +19,9 @@ WORKDIR /app
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Ensure public directory exists
|
||||||
|
RUN mkdir -p public
|
||||||
|
|
||||||
# Next.js telemetry
|
# Next.js telemetry
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
|
|
@ -34,7 +37,9 @@ ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
RUN addgroup --system --gid 1001 nodejs
|
RUN addgroup --system --gid 1001 nodejs
|
||||||
RUN adduser --system --uid 1001 nextjs
|
RUN adduser --system --uid 1001 nextjs
|
||||||
|
|
||||||
COPY --from=builder /app/public ./public
|
# Create public directory and copy contents if they exist
|
||||||
|
RUN mkdir -p public
|
||||||
|
COPY --from=builder /app/public/. ./public/
|
||||||
|
|
||||||
# Set the correct permission for prerender cache
|
# Set the correct permission for prerender cache
|
||||||
RUN mkdir .next
|
RUN mkdir .next
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{"name":"letsbe-hub"}
|
||||||
Loading…
Reference in New Issue