-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
31 lines (23 loc) · 886 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
## Build app ##
FROM node:18-buster AS builder
WORKDIR /build
ARG REACT_APP_LAPIS_ACCESS_KEY
COPY package.json .
COPY package-lock.json .
RUN npm set progress=false && \
npm config set depth 0 && \
npm --quiet ci
COPY . .
RUN npm set progress=false && \
npm config set depth 0 && \
export REACT_APP_WEBSITE_HOST=https://cov-spectrum.org && \
export REACT_APP_SERVER_HOST=https://cov-spectrum.org/api/v2 && \
export REACT_APP_PPRETTY_HOST=https://cov-spectrum.org/api/ppretty && \
export REACT_APP_LAPIS_HOST=https://lapis.cov-spectrum.org/gisaid/v2 && \
export REACT_APP_ALTERNATIVE_SEQUENCE_DATA_SOURCE_URL=https://open.cov-spectrum.org && \
npm --quiet run build
## Serve via nginx ##
FROM nginx:stable as server
COPY --from=builder /build/build /app
COPY docker_resources/nginx-cov-spectrum.conf /etc/nginx/conf.d/default.conf
EXPOSE 3000