Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # nginx-gunicorn-flaskRestful
- FROM ubuntu:16.04
- RUN apt-get update
- RUN apt-get install -y python python-pip python-virtualenv nginx gunicorn supervisor
- # Setup flask application
- RUN mkdir -p /deploy/app
- COPY app /deploy/app
- RUN pip install -r /deploy/app/requirements.txt
- # Setup nginx
- RUN rm /etc/nginx/sites-enabled/default
- COPY flask.conf /etc/nginx/sites-available/
- RUN ln -s /etc/nginx/sites-available/flask.conf /etc/nginx/sites-enabled/flask.conf
- RUN echo "daemon off;" >> /etc/nginx/nginx.conf
- # Setup supervisord
- RUN mkdir -p /var/log/supervisor
- COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
- COPY gunicorn.conf /etc/supervisor/conf.d/gunicorn.conf
- # Start processes
- CMD ["/usr/bin/supervisord"]
Add Comment
Please, Sign In to add comment