mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 06:46:16 +00:00
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:
+6
-12
@@ -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"]
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
version: '2'
|
||||
services:
|
||||
httpbin:
|
||||
build: '.'
|
||||
ports:
|
||||
- '80:80'
|
||||
@@ -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'
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user