-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
38 lines (28 loc) · 1.12 KB
/
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
FROM node:12 as builder
COPY frontend /frontend
WORKDIR /frontend
RUN yarn install --frozen-lockfile && yarn build
# COPY example /example
# WORKDIR /example
# RUN yarn install --frozen-lockfile && yarn build
COPY wizard /wizard
WORKDIR /wizard
RUN yarn install --frozen-lockfile && yarn build
FROM nginx:1.21.1
COPY backend/requirements.txt requirements.txt
RUN apt update && apt install -y python3 python3-pip gcc libssl-dev python-gevent
RUN CFLAGS="-I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib" \
UWSGI_PROFILE_OVERRIDE=ssl=true pip3 install uwsgi==2.0.19.1 -Iv
# RUN pip3 install flask flask_socketio flask_cors pyfcm pynacl
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt --ignore-installed
RUN pip3 install gevent
COPY --from=builder /frontend/dist /var/www/html/frontend
# COPY --from=builder /example/dist /var/www/html/example
COPY --from=builder /wizard/dist /var/www/html/wizard
COPY backend/ /usr/share/nginx/backend
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY services.sh /services.sh
RUN chmod +x /services.sh
WORKDIR /usr/share/nginx/backend/
CMD /./services.sh