2020-03-23 12:24:37 +00:00
|
|
|
FROM node:lts AS development
|
2020-03-05 17:40:44 +00:00
|
|
|
|
2020-03-23 12:24:37 +00:00
|
|
|
ENV CI=true
|
|
|
|
ENV PORT=3000
|
2020-03-05 17:40:44 +00:00
|
|
|
|
2020-03-23 12:24:37 +00:00
|
|
|
WORKDIR /code
|
|
|
|
COPY package.json /code/package.json
|
|
|
|
COPY package-lock.json /code/package-lock.json
|
|
|
|
RUN npm ci
|
|
|
|
COPY . /code
|
2020-03-05 17:40:44 +00:00
|
|
|
|
2020-03-23 12:24:37 +00:00
|
|
|
CMD [ "npm", "start" ]
|
|
|
|
|
|
|
|
FROM development AS builder
|
|
|
|
|
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
FROM nginx:1.13-alpine
|
|
|
|
|
|
|
|
COPY --from=builder /code/build /usr/share/nginx/html
|