2023-03-23 18:54:51 +01:00
|
|
|
# build stage
|
2023-03-31 01:10:00 +02:00
|
|
|
FROM node:lts-alpine AS build-stage
|
2023-03-23 18:54:51 +01:00
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN npm install -g pnpm
|
|
|
|
RUN pnpm i --frozen-lockfile
|
|
|
|
RUN pnpm build
|
|
|
|
|
|
|
|
# production stage
|
2023-03-31 01:10:00 +02:00
|
|
|
FROM nginx:stable-alpine AS production-stage
|
2023-03-23 18:54:51 +01:00
|
|
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
2023-03-29 00:11:29 +02:00
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
2023-06-01 22:15:33 +02:00
|
|
|
COPY startup.sh /docker-entrypoint.d/startup.sh
|
|
|
|
ENV PORT 80
|
|
|
|
EXPOSE ${PORT}
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|