From fc6bb22400781a8b82d20e302a43e1286d56c5b9 Mon Sep 17 00:00:00 2001 From: Henry <30578846+hjball@users.noreply.github.com> Date: Mon, 16 Jun 2025 22:50:21 +0100 Subject: [PATCH] fix: copy static files and use explicit shell in Docker (#86) (#87) * fix: copy static files to standalone dir * fix: update Dockerfile to use /bin/sh for entrypoint execution * fix: update Dockerfile to copy static files from apps/web directory * fix: copy from root * fix: set workdir * fix: copy files from inside the container * fix: add logs to debug * fix: remove workdir * fix: log contents of build * fix: copy static files * fix: remove log * chore: remove spacing --- apps/web/Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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"]