weppy-nginx-uwsgi.dockerfile 617 B

12345678910111213141516171819
  1. FROM python:3.6.6-stretch
  2. RUN curl -s http://nginx.org/keys/nginx_signing.key | apt-key add -
  3. RUN echo "deb http://nginx.org/packages/debian/ stretch nginx" >> /etc/apt/sources.list
  4. RUN echo "deb-src http://nginx.org/packages/debian/ stretch nginx" >> /etc/apt/sources.list
  5. RUN apt-get update -yqq && apt-get install -yqq nginx
  6. ADD ./ /weppy
  7. WORKDIR /weppy
  8. RUN pip install -r /weppy/requirements.txt
  9. RUN sed -i 's|include .*/conf/uwsgi_params;|include /etc/nginx/uwsgi_params;|g' /weppy/nginx.conf
  10. EXPOSE 8080
  11. CMD nginx -c /weppy/nginx.conf && uwsgi --ini /weppy/uwsgi.ini --processes $(nproc) --wsgi app:app