-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDockerfile
39 lines (29 loc) · 963 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
33
34
35
36
37
38
39
#-------------------------- build stage ---------------------
FROM node:16-alpine as build-stage
WORKDIR /app
#install dependencies
COPY ./frontend/package.json ./
RUN npm install --force
#main fe logic (docker optimization)
COPY ./frontend ./
#copy release config
COPY ./release/config.js ./src/common
RUN npm run build
#-------------------------- prod stage ----------------------
FROM tiangolo/uwsgi-nginx-flask:python3.8 as production-stage
#serve static/index.html
ENV STATIC_INDEX 1
ENV LISTEN_PORT 80
#install dependencies
COPY ./backend/requirements.txt /app
RUN pip install -r /app/requirements.txt
COPY ./backend/requirements_aligner.txt /app
RUN pip install -r /app/requirements_aligner.txt
#copy assets
RUN mkdir /app/static /app/static/flags
COPY ./frontend/src/assets/flags /app/static/flags
#BE app (docker optimization)
COPY ./backend /app
#copy release config
COPY ./release/config.py /app
COPY --from=build-stage /app/dist /app/static