2021-04-17 19:42:38 +02:00
|
|
|
|
|
|
|
# Build Stage
|
|
|
|
FROM node:lts-alpine as build-stage
|
|
|
|
LABEL Maintainer Alicia Sykes <alicia@omg.lol>
|
|
|
|
|
|
|
|
RUN apk update
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY package.json ./
|
|
|
|
COPY yarn.lock ./
|
|
|
|
RUN yarn install
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
RUN yarn build
|
|
|
|
|
|
|
|
# Production Stage
|
2021-05-24 21:46:58 +02:00
|
|
|
ENV PORT 80
|
|
|
|
|
2021-04-17 19:42:38 +02:00
|
|
|
FROM nginx:1.15.7-alpine as production-stage
|
|
|
|
|
|
|
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
|
|
|
|
2021-05-24 21:46:58 +02:00
|
|
|
EXPOSE ${PORT}
|
|
|
|
VOLUME /usr/share/nginx/html/item-icons
|
2021-04-17 19:42:38 +02:00
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|