From 490b07d5b45dd91c31d5845df7ec60f84afa4d59 Mon Sep 17 00:00:00 2001 From: Felipe M Date: Wed, 4 Nov 2020 13:14:14 +0100 Subject: [PATCH] Using waitress to serve wsgi --- docker/bin/start-server.sh | 2 +- poetry.lock | 18 +++++++++++++++++- pyproject.toml | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docker/bin/start-server.sh b/docker/bin/start-server.sh index d6be1ca..aa5ea13 100755 --- a/docker/bin/start-server.sh +++ b/docker/bin/start-server.sh @@ -1,3 +1,3 @@ #!/bin/sh -xe -hypercorn butterrobot.app -b "0.0.0.0:${APP_PORT}" +waitress-serve --port=${APP_PORT} 'butterrobot.app:app' \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 056df31..48eba86 100644 --- a/poetry.lock +++ b/poetry.lock @@ -505,6 +505,18 @@ brotli = ["brotlipy (>=0.6.0)"] secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"] +[[package]] +category = "main" +description = "Waitress WSGI server" +name = "waitress" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +version = "1.4.4" + +[package.extras] +docs = ["Sphinx (>=1.8.1)", "docutils", "pylons-sphinx-themes (>=1.0.9)"] +testing = ["pytest", "pytest-cover", "coverage (>=5.0)"] + [[package]] category = "dev" description = "Measures the displayed width of unicode strings in a terminal" @@ -540,7 +552,7 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["jaraco.itertools", "func-timeout"] [metadata] -content-hash = "76fdbeb7b0f4a02bb2ee756204e4579c589cea248bb9b01ddebae4c64ae5d5a3" +content-hash = "2d9ef41b299ed10e058dfec57631714e9c932e2e3826194e341d92edd2371abb" lock-version = "1.0" python-versions = "^3.7" @@ -798,6 +810,10 @@ urllib3 = [ {file = "urllib3-1.25.11-py2.py3-none-any.whl", hash = "sha256:f5321fbe4bf3fefa0efd0bfe7fb14e90909eb62a48ccda331726b4319897dd5e"}, {file = "urllib3-1.25.11.tar.gz", hash = "sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2"}, ] +waitress = [ + {file = "waitress-1.4.4-py2.py3-none-any.whl", hash = "sha256:3d633e78149eb83b60a07dfabb35579c29aac2d24bb803c18b26fb2ab1a584db"}, + {file = "waitress-1.4.4.tar.gz", hash = "sha256:1bb436508a7487ac6cb097ae7a7fe5413aefca610550baf58f0940e51ecfb261"}, +] wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, diff --git a/pyproject.toml b/pyproject.toml index cf0fc32..3fd04a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ colorama = "^0.4.3" dice = "^3.1.0" flask = "^1.1.2" requests = "^2.24.0" +waitress = "^1.4.4" [tool.poetry.dev-dependencies] black = "^19.10b0"