Docker updates (#452)

* docker optimizations

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>

* port 80

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>

* no web concurrency

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>

* docker compose

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>

* v0.8.0

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2018-05-17 18:57:51 -04:00
committed by Ian Stapleton Cordasco
parent d2da2f74ef
commit 0d7f363f63
3 changed files with 14 additions and 14 deletions
+6 -12
View File
@@ -1,17 +1,11 @@
FROM python:3-alpine
ENV WEB_CONCURRENCY=4
FROM ubuntu:18.04
ADD . /httpbin
RUN apk add -U ca-certificates libffi libstdc++ && \
apk add --virtual build-deps build-base libffi-dev && \
# Pip
pip install --no-cache-dir gunicorn /httpbin && \
# Cleaning up
apk del build-deps && \
rm -rf /var/cache/apk/*
RUN apt update -y
RUN apt install python3-pip -y
RUN pip3 install --no-cache-dir gunicorn /httpbin
EXPOSE 8080
EXPOSE 80
CMD ["gunicorn", "-b", "0.0.0.0:8080", "httpbin:app"]
CMD ["gunicorn", "-b", "0.0.0.0:80", "httpbin:app", "-k", "gevent"]
+6
View File
@@ -0,0 +1,6 @@
version: '2'
services:
httpbin:
build: '.'
ports:
- '80:80'
+2 -2
View File
@@ -7,7 +7,7 @@ import io
setup(
name="httpbin",
version="0.7.0",
version="0.8.0",
description="HTTP Request and Response Service",
# long_description=long_description,
@@ -35,6 +35,6 @@ setup(
include_package_data = True, # include files listed in MANIFEST.in
install_requires=[
'Flask', 'MarkupSafe', 'decorator', 'itsdangerous', 'six', 'brotlipy',
'raven[flask]', 'werkzeug>=0.14.1'
'raven[flask]', 'werkzeug>=0.14.1', 'gevent'
],
)