fix(docker): ensure public directory exists for web standalone build
This commit is contained in:
+3
-1
@@ -23,6 +23,8 @@ COPY --from=deps /app ./
|
|||||||
COPY packages/shared ./packages/shared
|
COPY packages/shared ./packages/shared
|
||||||
COPY apps/web ./apps/web
|
COPY apps/web ./apps/web
|
||||||
|
|
||||||
|
RUN mkdir -p apps/web/public
|
||||||
|
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
@@ -49,7 +51,7 @@ ENV HOSTNAME="0.0.0.0"
|
|||||||
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 standalone output from builder
|
# Copy public & standalone output from builder
|
||||||
COPY --from=builder /app/apps/web/public ./apps/web/public
|
COPY --from=builder /app/apps/web/public ./apps/web/public
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
|
COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
|
COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
# static public assets
|
||||||
Reference in New Issue
Block a user