forked from mrhanlon/python-nginx-example-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (17 loc) · 680 Bytes
/
Dockerfile
File metadata and controls
22 lines (17 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM mrhanlon/python-nginx:latest
MAINTAINER Matthew R Hanlon <mrhanlon@gmail.com>
# setup project code
COPY . /project
WORKDIR /project
# install any dependencies
RUN pip install -r requirements.txt
# configure nginx, uwsgi, supervisord
# sets nginx to run interactively for supervisord, removes the default nginx
# site, and moves your nginx and supervisord configuration in place
RUN \
echo "daemon off;" >> /etc/nginx/nginx.conf \
&& rm /etc/nginx/sites-enabled/default \
&& ln -s /project/docker_config/nginx_app.conf /etc/nginx/sites-enabled/ \
&& ln -s /project/docker_config/supervisor_app.conf /etc/supervisor/conf.d/
EXPOSE 80 443
CMD ["supervisord", "-n"]