diff --git a/Dockerfile b/Dockerfile index 9295980..35d5be6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,4 +11,4 @@ RUN poetry install --no-dev COPY ./ ./ -CMD ["flask", "run", "--host", "0.0.0.0"] +CMD ["gunicorn", "--bind", "0.0.0.0"] diff --git a/docker-compose.yaml b/docker-compose.yaml index c53add1..9fbc182 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,4 +3,4 @@ services: build: . init: true ports: - - "127.0.0.1:5123:5000" + - "127.0.0.1:5123:8000" diff --git a/gunicorn.conf.py b/gunicorn.conf.py new file mode 100644 index 0000000..7f8e09b --- /dev/null +++ b/gunicorn.conf.py @@ -0,0 +1 @@ +wsgi_app = 'app:app' diff --git a/poetry.lock b/poetry.lock index 64eac0d..2b72551 100644 --- a/poetry.lock +++ b/poetry.lock @@ -44,6 +44,20 @@ Werkzeug = ">=2.3.3" async = ["asgiref (>=3.2)"] dotenv = ["python-dotenv"] +[[package]] +name = "gunicorn" +version = "20.1.0" +description = "WSGI HTTP Server for UNIX" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +eventlet = ["eventlet (>=0.24.1)"] +gevent = ["gevent (>=1.4.0)"] +setproctitle = ["setproctitle"] +tornado = ["tornado (>=0.2)"] + [[package]] name = "itsdangerous" version = "2.1.2" @@ -91,13 +105,14 @@ watchdog = ["watchdog (>=2.3)"] [metadata] lock-version = "1.1" python-versions = "^3.10" -content-hash = "d7a65ba75d9fd1d70398a76955d93d28129b8c09a3b56e10fef71ce427090c8b" +content-hash = "4ec3e1cccd00033533e7cccad14be71112cf16ba8c1694db899d9a321267d818" [metadata.files] blinker = [] click = [] colorama = [] flask = [] +gunicorn = [] itsdangerous = [] jinja2 = [] markupsafe = [] diff --git a/pyproject.toml b/pyproject.toml index 74113a8..c772637 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,7 @@ authors = ["Kenneth Allen "] [tool.poetry.dependencies] python = "^3.10" Flask = "^2.3.2" +gunicorn = "^20.1.0" [tool.poetry.dev-dependencies]