2018-12-04 16:00:16 +01:00
|
|
|
# Builder
|
|
|
|
FROM node:alpine as builder
|
|
|
|
|
2018-12-06 10:00:20 +01:00
|
|
|
RUN apk add --no-cache git
|
2018-12-04 16:00:16 +01:00
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
2018-12-06 10:00:20 +01:00
|
|
|
COPY package.json /src/package.json
|
|
|
|
RUN npm install
|
|
|
|
|
|
|
|
COPY . /src
|
|
|
|
RUN npm run build
|
2018-12-04 16:00:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
# App
|
|
|
|
FROM nginx:latest
|
|
|
|
|
|
|
|
COPY --from=builder /src/webapp /app
|
|
|
|
COPY config.sample.json /app/config.json
|
|
|
|
|
|
|
|
RUN rm -rf /usr/share/nginx/html \
|
|
|
|
&& ln -s /app /usr/share/nginx/html
|