fix: Fix Docker build for public directory
Build and Push Docker Image / lint-and-typecheck (push) Successful in 1m3s Details
Build and Push Docker Image / build (push) Successful in 2m38s Details

- 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:
Matt 2026-01-06 13:55:36 +01:00
parent 7dc7100fb8
commit 60493cfbdd
3 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -1 +0,0 @@

1
public/manifest.json Normal file
View File

@ -0,0 +1 @@
{"name":"letsbe-hub"}