-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile-spfy
34 lines (27 loc) · 967 Bytes
/
Dockerfile-spfy
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
# This builds the 'webserver' image which is our Flask API.
FROM superphy/docker-flask-conda:ws.v6.3.1
## Nginx:
# Make NGINX run on the foreground
#TEMPORARY RUN echo "daemon off;" >> /etc/nginx/nginx.conf
# Remove default configuration from Nginx
#TEMPORARY RUN rm /etc/nginx/conf.d/default.conf
# Copy the modified Nginx conf
COPY nginx.conf /etc/nginx/conf.d/
# Copy the base uWSGI ini file to enable default dynamic uwsgi process number
COPY uwsgi-base.ini /etc/uwsgi/
# Add maximum upload of 100 m
COPY upload_60G.conf /etc/nginx/conf.d/
#TEMPORARY
RUN rm /etc/nginx/conf.d/upload_100m.conf
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
COPY ./app /app
WORKDIR /app
ENV PATH /opt/conda/bin:$PATH
# activate the app environment
ENV PATH /opt/conda/envs/backend/bin:$PATH
#### End Spfy
RUN echo $PATH
RUN which uwsgi
CMD ["/usr/bin/supervisord"]