* 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
This commit is contained in:
@@ -53,8 +53,14 @@ RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm install --frozen-lockfi
|
|||||||
# Copy source code of isolated subworkspace
|
# Copy source code of isolated subworkspace
|
||||||
COPY --from=pruner /app/out/full/ .
|
COPY --from=pruner /app/out/full/ .
|
||||||
|
|
||||||
|
|
||||||
RUN pnpm build --filter=${PROJECT}
|
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
|
# 4. Final image - runner stage to run the application
|
||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
ARG APP_DIRNAME
|
ARG APP_DIRNAME
|
||||||
@@ -75,5 +81,5 @@ ARG PORT=3000
|
|||||||
ENV PORT=${PORT}
|
ENV PORT=${PORT}
|
||||||
EXPOSE ${PORT}
|
EXPOSE ${PORT}
|
||||||
|
|
||||||
CMD ["./entrypoint.sh"]
|
CMD ["/bin/sh", "./entrypoint.sh"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user