Revert to Granian and remove bind mount for static files as that seems to just result in crashes

This commit is contained in:
Keannu Bernasol 2024-09-15 01:05:54 +08:00
parent 8de2c6936b
commit 0e902b1f04
2 changed files with 3 additions and 4 deletions

View file

@ -10,8 +10,6 @@ services:
environment: environment:
- PYTHONBUFFERED=1 - PYTHONBUFFERED=1
- RUN_TYPE=web - RUN_TYPE=web
volumes:
- ./backend/static:/code/backend/static
depends_on: depends_on:
- postgres - postgres

View file

@ -13,8 +13,9 @@ if [ "$RUN_TYPE" = "web" ]; then
if [ "$BACKEND_DEBUG" = 'True' ]; then if [ "$BACKEND_DEBUG" = 'True' ]; then
python manage.py runserver "0.0.0.0:8000" python manage.py runserver "0.0.0.0:8000"
else else
gunicorn --workers 8 --bind 0.0.0.0:8000 config.wsgi:application # Feel free to replace the WSGI server here with something else
# python -m granian --host 0.0.0.0 --port 8000 --workers 8 --interface wsgi config.wsgi:application # gunicorn --workers 8 --bind 0.0.0.0:8000 config.wsgi:application # Gunicorn
python -m granian --host 0.0.0.0 --port 8000 --workers 8 --interface wsgi config.wsgi:application # Granian
fi fi
elif [ "$RUN_TYPE" = "worker" ]; then elif [ "$RUN_TYPE" = "worker" ]; then
celery -A config worker -l INFO -E --concurrency 1 celery -A config worker -l INFO -E --concurrency 1