-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
29 lines (21 loc) · 834 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
FROM hasaltaiar/ubuntu_miniconda3:latest
# Install gunicorn supervisor
RUN apt-get update \
&& apt-get install -y nginx supervisor libcurl4-openssl-dev libboost-python-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install flask and environment
COPY environment.yml /app/environment.yml
RUN conda env update -f /app/environment.yml -n base --prune
# Setup gunicorn and nginx
COPY flask.conf /etc/nginx/sites-available/
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN rm /etc/nginx/sites-enabled/default \
&& ln -s /etc/nginx/sites-available/flask.conf /etc/nginx/sites-enabled/flask.conf \
&& echo "daemon off;" >> /etc/nginx/nginx.conf \
&& mkdir -p /var/log/supervisor
RUN mkdir -p /app
COPY /src /app
RUN mkdir -p /certs
COPY /certs/ /certs/
CMD ["/usr/bin/supervisord"]