2022-09-06 17:22:23 +00:00
|
|
|
# build environment
|
|
|
|
FROM node:14-alpine as build
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json yarn.lock ./
|
|
|
|
RUN yarn install --frozen-lockfile
|
|
|
|
COPY . .
|
|
|
|
RUN yarn build
|
|
|
|
|
|
|
|
# production environment
|
|
|
|
FROM nginx:stable-alpine
|
2024-01-27 05:42:45 +00:00
|
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
2022-09-06 17:22:23 +00:00
|
|
|
COPY --from=build /app/nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
CMD nginx -g 'daemon off;'
|