From e67016fed98e1de7daa82826f8880e8ed6d9519b Mon Sep 17 00:00:00 2001 From: Mike Chagnon Date: Sun, 24 Apr 2022 13:20:44 -0700 Subject: [PATCH] changed web container to serve Django through gunicorn/uvicorn --- docker-compose.yml | 4 ++-- requirements.txt | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e170591..cbcb8f2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,8 +19,8 @@ services: args: HTTP_PROXY: '${HTTP_PROXY}' HTTPS_PROXY: '${HTTPS_PROXY}' - - command: python manage.py runserver 0.0.0.0:8000 + #command: python manage.py runserver 0.0.0.0:8000 + command: gunicorn --bind 0.0.0.0:8000 --workers 2 -k uvicorn.workers.UvicornWorker photic.asgi:application volumes: - .:/code - ${ROI_PATH}:/rois diff --git a/requirements.txt b/requirements.txt index 3262f6f..b595ba6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ Django>=3.0 psycopg2==2.8.5 -Pillow \ No newline at end of file +Pillow +gunicorn==20.1.0 +uvicorn==0.17.6 \ No newline at end of file