changed dockerfile to take an argument specifying which project to build

pull/1/head
Chris Veilleux 2018-11-12 22:24:04 -06:00
parent 97012189dc
commit 880cdf6885
2 changed files with 5 additions and 2 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
dist
node_modules

View File

@ -7,8 +7,9 @@ COPY package*.json ./
RUN npm install
COPY . .
ARG selene_env
RUN npm run build-${selene_env}
ARG application_name
RUN npm run build-${selene_env} -- --project=${application_name}
# STAGE TWO: build the web server and copy the compiled angular app to it.
FROM nginx:latest
COPY --from=build /usr/src/app/dist/mycroft-marketplace /usr/share/nginx/html
COPY --from=build /usr/src/app/dist/${application_name} /usr/share/nginx/html