-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile-nginx
25 lines (19 loc) · 1.05 KB
/
Dockerfile-nginx
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
FROM akvo/rsr-backend-front-end:local as front-end
FROM akvo/rsr-backend-spa:local as spa
FROM akvo/rsr-backend-dir:local as dir
FROM akvo/rsr-backend-prod-no-code-with-nodejs:local as builder
ENV DJANGO_SECRET_KEY=any
COPY akvo/ /var/akvo/rsr/code/akvo
COPY --from=front-end /var/akvo/rsr/code/akvo/rsr/front-end/static/ /var/akvo/rsr/code/akvo/rsr/front-end/static/
RUN python manage.py collectstatic --noinput
FROM nginx:1.17.9-alpine
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /var/akvo/rsr/staticroot/rsr/images/favicon.ico /usr/share/nginx/html/favicon.ico
COPY nginx/robots-production.txt /usr/share/nginx/html/robots-production.txt
COPY nginx/robots-test.txt /usr/share/nginx/html/robots-test.txt
COPY --from=builder /var/akvo/rsr/staticroot/ /var/akvo/rsr/staticroot/
COPY --from=spa /var/akvo/rsr/code/akvo/rsr/spa/dist/ /var/akvo/rsr/sparoot/
COPY --from=dir /var/akvo/rsr/code/akvo/rsr/dir/dist/ /var/akvo/rsr/projectdirectoryroot/
COPY nginx/start.sh /start.sh
CMD ["/start.sh"]