2020-07-21 00:01:07 +00:00
|
|
|
# build environment
|
2020-07-21 02:27:43 +00:00
|
|
|
FROM node:current-alpine as build-stage
|
2020-07-21 00:01:07 +00:00
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
|
|
RUN npm install
|
|
|
|
COPY . .
|
2020-07-21 02:27:43 +00:00
|
|
|
|
2020-07-22 00:02:13 +00:00
|
|
|
ARG SERVERS='[{"name":"Local Server","location":"Local","url":"","image":"synclounge-white.png"}]'
|
2020-07-22 21:38:44 +00:00
|
|
|
ARG SOURCE_COMMIT
|
|
|
|
ARG SOURCE_BRANCH
|
2020-07-21 00:01:07 +00:00
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
# production environment
|
2020-07-21 02:27:43 +00:00
|
|
|
FROM node:current-alpine as production-stage
|
2020-07-21 00:01:07 +00:00
|
|
|
WORKDIR /app
|
2020-07-22 00:06:07 +00:00
|
|
|
RUN npm install -g syncloungesocket@2.0.6 nconf fs
|
2020-07-21 21:54:59 +00:00
|
|
|
COPY docker-entrypoint.sh .
|
2020-07-21 21:28:48 +00:00
|
|
|
COPY config config
|
|
|
|
COPY --from=build-stage /app/dist dist
|
|
|
|
ENTRYPOINT ["./docker-entrypoint.sh"]
|