diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index d898e44b..6519a83f 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -53,8 +53,14 @@ RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm install --frozen-lockfi # Copy source code of isolated subworkspace COPY --from=pruner /app/out/full/ . + RUN pnpm build --filter=${PROJECT} +# Copy static files to standalone directory +RUN mkdir -p apps/web/.next/standalone/.next && \ +mv apps/web/public apps/web/.next/standalone/ && \ +mv apps/web/.next/static apps/web/.next/standalone/.next/ + # 4. Final image - runner stage to run the application FROM base AS runner ARG APP_DIRNAME @@ -75,5 +81,5 @@ ARG PORT=3000 ENV PORT=${PORT} EXPOSE ${PORT} -CMD ["./entrypoint.sh"] +CMD ["/bin/sh", "./entrypoint.sh"]