Guest User

Untitled

a guest
Oct 23rd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. # nginx-gunicorn-flaskRestful
  2.  
  3. FROM ubuntu:16.04
  4.  
  5. RUN apt-get update
  6. RUN apt-get install -y python python-pip python-virtualenv nginx gunicorn supervisor
  7.  
  8. # Setup flask application
  9. RUN mkdir -p /deploy/app
  10. COPY app /deploy/app
  11. RUN pip install -r /deploy/app/requirements.txt
  12.  
  13. # Setup nginx
  14. RUN rm /etc/nginx/sites-enabled/default
  15. COPY flask.conf /etc/nginx/sites-available/
  16. RUN ln -s /etc/nginx/sites-available/flask.conf /etc/nginx/sites-enabled/flask.conf
  17. RUN echo "daemon off;" >> /etc/nginx/nginx.conf
  18.  
  19. # Setup supervisord
  20. RUN mkdir -p /var/log/supervisor
  21. COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
  22. COPY gunicorn.conf /etc/supervisor/conf.d/gunicorn.conf
  23.  
  24. # Start processes
  25. CMD ["/usr/bin/supervisord"]
Add Comment
Please, Sign In to add comment