forked from OpenReqEU/ri-visualization
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 658 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 658 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM node:latest
ADD package.json /tmp/package.json
RUN cd /tmp && npm install
RUN mkdir -p /usr/src/app && cp -a /tmp/node_modules /usr/src/app
# From here we load our application's code in, therefore the previous docker
# "layer" thats been cached will be used if possible
WORKDIR /usr/src/app
ADD . /usr/src/app
ARG VUE_APP_BASE_URL
ARG VUE_APP_BACKUP_URL
ARG VUE_APP_BEARER_TOKEN
ENV VUE_APP_BASE_URL=$VUE_APP_BASE_URL
ENV VUE_APP_BACKUP_URL=$VUE_APP_BACKUP_URL
ENV VUE_APP_BEARER_TOKEN=$VUE_APP_BEARER_TOKEN
ENV NODE_ENV=production
RUN npm run build
RUN rm -rf ./build
RUN rm -rf ./test
ENV PORT=9707
EXPOSE 9707
CMD [ "npm", "run", "serve" ]