uwsgi-nginx-uwsgi.dockerfile 608 B

12345678910111213141516171819
  1. FROM python:2.7.15-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 ./ /uw
  7. WORKDIR /uw
  8. RUN pip install -r /uw/requirements.txt
  9. RUN sed -i 's|include .*/conf/uwsgi_params;|include /etc/nginx/uwsgi_params;|g' /uw/nginx.conf
  10. EXPOSE 8080
  11. CMD nginx -c /uw/nginx.conf && uwsgi --ini uwsgi.ini --processes $(nproc) --gevent 1000 --wsgi hello