|
@@ -1,18 +1,17 @@
|
|
|
-FROM techempower/nginx:0.1
|
|
|
+FROM python:3.6.5
|
|
|
|
|
|
-FROM techempower/python3:0.1
|
|
|
+RUN curl -s http://nginx.org/keys/nginx_signing.key | apt-key add -
|
|
|
+RUN echo "deb http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list
|
|
|
+RUN echo "deb-src http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list
|
|
|
|
|
|
-COPY --from=0 /nginx /nginx
|
|
|
-
|
|
|
-ENV NGINX_HOME="/nginx"
|
|
|
-ENV PATH=/nginx/sbin:${PATH}
|
|
|
+RUN apt update -yqq && apt install -yqq nginx
|
|
|
|
|
|
ADD ./ /bottle
|
|
|
|
|
|
WORKDIR /bottle
|
|
|
|
|
|
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /bottle/requirements.txt
|
|
|
+RUN pip3 install -r /bottle/requirements.txt
|
|
|
|
|
|
-RUN sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' /bottle/nginx.conf
|
|
|
+RUN sed -i 's|include .*/conf/uwsgi_params;|include /etc/nginx/uwsgi_params;|g' /bottle/nginx.conf
|
|
|
|
|
|
CMD nginx -c /bottle/nginx.conf && uwsgi --ini /bottle/uwsgi.ini --processes $(($(nproc)*3)) --wsgi app:app
|