fix: properly use threads and workers

pull/1/head
palid 2024-01-14 13:53:39 +01:00
parent 2323263ccb
commit ea5e223fcc
Signed by: palid
SSH Key Fingerprint: SHA256:Mus3wCd2x6nxtARI0DpWGT7lIWbNy3R90BVDg0j35PI
3 changed files with 8 additions and 6 deletions

View File

@ -18,3 +18,5 @@ build_static
.history .history
log log
.Dockerfile .Dockerfile
.env
.devcontainer

View File

@ -15,4 +15,4 @@ ADD . /code/
RUN python -m pip install gunicorn RUN python -m pip install gunicorn
RUN python manage.py collectstatic --no-input --clear RUN python manage.py collectstatic --no-input --clear
CMD bash -c "python manage.py migrate && gunicorn -b 0.0.0.0:8000 --capture-output --error-logfile - --access-logfile - spejstore.wsgi:application" CMD bash -c "python manage.py migrate && gunicorn --workers 1 --threads 4 -b 0.0.0.0:8000 --capture-output --error-logfile - --access-logfile - spejstore.wsgi:application"

View File

@ -17,7 +17,7 @@ services:
web: web:
build: . build: .
restart: always restart: always
command: bash -c "python manage.py migrate && gunicorn -b 0.0.0.0:8000 --capture-output --error-logfile - --access-logfile - spejstore.wsgi:application" command: bash -c "python manage.py migrate && gunicorn --workers 1 --threads 4 -b 0.0.0.0:8000 --capture-output --error-logfile - --access-logfile - spejstore.wsgi:application"
volumes: volumes:
- .:/code - .:/code
- /code/build_static - /code/build_static