mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-17 02:38:29 +00:00
Add frontend build stage to Dockerfile
Add a stage for building the frontend web app in the Dockerfile.
This commit is contained in:
parent
c482c9fea2
commit
efcc7ebb32
10
Dockerfile
10
Dockerfile
@ -15,11 +15,19 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
|||||||
|
|
||||||
RUN pnpm deploy --filter=@imput/cobalt-api --prod /prod/api
|
RUN pnpm deploy --filter=@imput/cobalt-api --prod /prod/api
|
||||||
|
|
||||||
|
FROM base AS frontend
|
||||||
|
WORKDIR /app/web
|
||||||
|
COPY web /app/web
|
||||||
|
|
||||||
|
RUN pnpm install --frozen-lockfile
|
||||||
|
RUN pnpm run build
|
||||||
|
|
||||||
FROM base AS api
|
FROM base AS api
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=build /prod/api /app
|
COPY --from=build /prod/api /app
|
||||||
COPY --from=build /app/.git /app/.git
|
COPY --from=build /app/.git /app/.git
|
||||||
|
COPY --from=frontend /app/web/build /app/public
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
CMD [ "node", "src/cobalt" ]
|
CMD [ "node", "src/cobalt" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user