15 lines
331 B
Docker
15 lines
331 B
Docker
# build environment
|
|
FROM node:latest as build
|
|
WORKDIR /app
|
|
COPY package.json /app/package.json
|
|
RUN yarn install
|
|
COPY . /app
|
|
RUN yarn build
|
|
|
|
# production environment
|
|
FROM nginx:latest
|
|
COPY --from=build /app/build /usr/share/nginx/html
|
|
COPY ./default.conf /etc/nginx/conf.d
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|