2024-07-03 13:55:34 +00:00
|
|
|
FROM node:20 as builder
|
2022-10-07 14:15:53 +00:00
|
|
|
|
|
|
|
ARG BACKEND_BASE_URL
|
|
|
|
RUN npm install -g npm
|
|
|
|
|
|
|
|
USER node
|
|
|
|
|
|
|
|
COPY --chown=1000:1000 ./package.json /application/package.json
|
|
|
|
|
|
|
|
WORKDIR /application
|
|
|
|
|
2024-07-03 13:55:34 +00:00
|
|
|
RUN yarn install
|
2022-10-07 14:15:53 +00:00
|
|
|
|
|
|
|
COPY --chown=1000:1000 . /application
|
|
|
|
|
2024-07-03 13:55:34 +00:00
|
|
|
RUN yarn generate
|
2022-10-07 14:15:53 +00:00
|
|
|
|
|
|
|
FROM nginx
|
|
|
|
|
2024-07-03 13:55:34 +00:00
|
|
|
COPY --from=builder --chown=1000:1000 /application/.output/public/ /usr/share/nginx/html
|
2022-10-07 14:15:53 +00:00
|
|
|
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|