From 4d9a4c8d9720b2e08932609024fd57ac7d405a19 Mon Sep 17 00:00:00 2001 From: Michael Hiiva Date: Sat, 16 Oct 2021 22:47:36 -0700 Subject: [PATCH 1/4] Added Correct Ports for runserver for django. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7c19bfe6..49a3f830 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: build: ./ restart: always ports: - - "8000:3031" + - "8000:8000" environment: DB_HOST: db DB_PORT: 3306 From 964dbeec4aa216ca2fc11c7d34ec50b54494dfa9 Mon Sep 17 00:00:00 2001 From: Michael Hiiva Date: Sat, 16 Oct 2021 22:48:22 -0700 Subject: [PATCH 2/4] Change to standard server for django local development. --- scripts/entrypoint.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 39228d4c..9a26518a 100755 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -41,13 +41,7 @@ function start_server() { if [ $r_flag == 0 ]; then - uwsgi --http-socket 0.0.0.0:3031 \ - --module agagd.wsgi \ - --static-map /static=/tmp/static/ \ - --static-map /media=/srv/media \ - --enable-threads \ - --python-autoreload 1 \ - --processes 2 + python manage.py runserver 0.0.0.0:8000 elif [ $r_flag == 1 ]; then uwsgi --http-socket 0.0.0.0:3031 \ From 7dc72170e6d7c21804d4ffa8830714eabb1cb470 Mon Sep 17 00:00:00 2001 From: Michael Hiiva Date: Sat, 16 Oct 2021 23:04:49 -0700 Subject: [PATCH 3/4] Moved from uwsgi to gunicorn. --- scripts/entrypoint.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 9a26518a..508a1b87 100755 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -44,12 +44,7 @@ function start_server() { python manage.py runserver 0.0.0.0:8000 elif [ $r_flag == 1 ]; then - uwsgi --http-socket 0.0.0.0:3031 \ - --module agagd.wsgi \ - --static-map /static=/tmp/static/ \ - --static-map /media=/srv/media - --enable-threads \ - --processes 2 + gunicorn -b 0.0.0.0:8000 agagd.wsgi fi } From 6f748162795f720fa96ed74efcc3c4d0e82ad5fb Mon Sep 17 00:00:00 2001 From: Michael Hiiva Date: Sat, 16 Oct 2021 23:11:04 -0700 Subject: [PATCH 4/4] Removed uwsgi from requirements.txt. --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 06714cde..b9783c66 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,4 +6,4 @@ django-extensions==3.1.3 jinja2==2.11.3 PyMySQL==1.0.2 yolk==0.4.3 -uwsgi==2.0.20 +gunicorn==20.1.0