2023-02-16 07:25:29 -05:00
|
|
|
# build front-end
|
|
|
|
FROM node:lts-alpine AS builder
|
2023-02-16 00:39:07 -05:00
|
|
|
|
|
|
|
COPY ./ /app
|
|
|
|
WORKDIR /app
|
|
|
|
|
2023-02-16 07:25:29 -05:00
|
|
|
RUN npm install pnpm -g && pnpm install && pnpm run build
|
|
|
|
|
|
|
|
# service
|
|
|
|
FROM node:lts-alpine
|
|
|
|
|
|
|
|
COPY /service /app
|
|
|
|
COPY --from=builder /app/dist /app/public
|
|
|
|
|
2023-02-16 00:39:07 -05:00
|
|
|
WORKDIR /app
|
2023-02-16 07:25:29 -05:00
|
|
|
RUN npm install pnpm -g && pnpm install
|
2023-02-16 00:39:07 -05:00
|
|
|
|
|
|
|
EXPOSE 3002
|
|
|
|
|
2023-02-16 07:25:29 -05:00
|
|
|
CMD ["pnpm", "run", "start"]
|