2022-05-28 22:08:49 +00:00
|
|
|
# BASE
|
|
|
|
FROM node:16-alpine as base
|
2021-11-17 14:36:58 +00:00
|
|
|
|
|
|
|
WORKDIR /app
|
2022-05-28 22:08:49 +00:00
|
|
|
RUN npm -g i pnpm@7
|
|
|
|
|
|
|
|
# BUILDER
|
|
|
|
FROM base as builder
|
2021-11-17 14:36:58 +00:00
|
|
|
|
|
|
|
COPY package.json pnpm-lock.yaml ./
|
2022-05-28 22:08:49 +00:00
|
|
|
RUN pnpm i --frozen-lockfile
|
2021-11-17 14:36:58 +00:00
|
|
|
|
|
|
|
COPY . .
|
2022-05-28 22:08:49 +00:00
|
|
|
RUN pnpm run build
|
2021-11-17 14:36:58 +00:00
|
|
|
RUN ls -hal
|
|
|
|
|
2022-05-28 22:08:49 +00:00
|
|
|
# RUNNER
|
|
|
|
FROM base
|
2021-11-17 14:36:58 +00:00
|
|
|
|
|
|
|
COPY package.json pnpm-lock.yaml ./
|
2022-05-28 22:08:49 +00:00
|
|
|
RUN pnpm install --frozen-lockfile --prod
|
2021-11-17 14:36:58 +00:00
|
|
|
|
|
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
|
2021-11-17 16:25:54 +00:00
|
|
|
ENV LOCAL_ASSETS=/data
|
2021-11-17 14:36:58 +00:00
|
|
|
ENV ADDRESS=0.0.0.0
|
2021-12-02 16:58:16 +00:00
|
|
|
ENV PORT=80
|
2021-11-17 15:20:50 +00:00
|
|
|
|
2021-11-17 14:36:58 +00:00
|
|
|
EXPOSE 80
|
2021-11-17 15:20:50 +00:00
|
|
|
|
|
|
|
CMD [ "node", "." ]
|