From 0d7f363f63e4e62acc1aa06174a5ed0f6b7e1383 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 17 May 2018 18:57:51 -0400 Subject: [PATCH] Docker updates (#452) * docker optimizations Signed-off-by: Kenneth Reitz * port 80 Signed-off-by: Kenneth Reitz * no web concurrency Signed-off-by: Kenneth Reitz * docker compose Signed-off-by: Kenneth Reitz * v0.8.0 Signed-off-by: Kenneth Reitz --- Dockerfile | 18 ++++++------------ docker-compose.yml | 6 ++++++ setup.py | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index 35abff6..88e41a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a7765f7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +version: '2' +services: + httpbin: + build: '.' + ports: + - '80:80' \ No newline at end of file diff --git a/setup.py b/setup.py index 7f9956b..8e27410 100644 --- a/setup.py +++ b/setup.py @@ -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' ], )