forked from p0bailey/docker-flask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
21 lines (17 loc) · 779 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM ubuntu:14.04
MAINTAINER Phillip Bailey <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
python-pip python-dev uwsgi-plugin-python \
nginx supervisor
COPY flask.conf /etc/nginx/sites-available/
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY app /var/www/app
RUN mkdir -p /var/log/nginx/app /var/log/uwsgi/app /var/log/supervisor \
&& 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 \
&& pip install -r /var/www/app/requirements.txt \
&& chown -R www-data:www-data /var/www/app \
&& chown -R www-data:www-data /var/log
CMD ["/usr/bin/supervisord"]