forked from asbi-cds-tools/asbi-screening-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (24 loc) · 854 Bytes
/
Dockerfile
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
29
30
31
32
FROM node:16 as build-deps
WORKDIR /opt/app
# cache hack; very fragile
# only copy files `yarn` needs to run
# avoids accidental cache invalidation by changes in code
COPY package.json yarn.lock ./
RUN yarn
COPY . .
RUN yarn build
FROM nginx as production
ARG VUE_APP_VERSION_STRING
ENV VUE_APP_VERSION_STRING=$VUE_APP_VERSION_STRING
# TODO remove when FHIR resources are PUT after SoF launch
# python3 needed for upload.py
RUN \
apt-get update && \
apt-get install --quiet --quiet --no-install-recommends \
python3 python3-requests
COPY src/fhir /var/opt/
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
# write environment variables to config file and start
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh", "/docker-entrypoint.sh"]
COPY --from=build-deps /opt/app/dist /usr/share/nginx/html
CMD ["nginx","-g","daemon off;"]