Skip to content

Commit

Permalink
Merge pull request #588 from jennydaman/granian
Browse files Browse the repository at this point in the history
Replace daphne with granian
  • Loading branch information
jennydaman authored Oct 18, 2024
2 parents 716f08c + baf7f4c commit 747d985
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ COPY chris_backend/ ./
RUN if [ "$ENVIRONMENT" = "production" ]; then \
env DJANGO_SETTINGS_MODULE=config.settings.common ./manage.py collectstatic; fi

CMD ["daphne", "-b", "0.0.0.0", "-p", "8000", "config.asgi:application"]
CMD ["granian", "--host", "0.0.0.0", "--interface", "asginl", "config.asgi:application"]
1 change: 0 additions & 1 deletion chris_backend/config/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

# Application definition
INSTALLED_APPS = [
'daphne',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
Expand Down
2 changes: 1 addition & 1 deletion docker-compose_just.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ services:
context: .
args:
ENVIRONMENT: local
command: bash -c 'python manage.py runserver 0.0.0.0:8000 2> >(grep -vF "HTTP GET /api/v1/users/ 200" 1>&2)'
ports:
- "8000:8000"
volumes: &CHRIS_VOLUMES
Expand All @@ -32,6 +31,7 @@ services:
DJANGO_SETTINGS_MODULE: "config.settings.local"
STORAGE_ENV: "fslink"
SPECTACULAR_SPLIT_REQUEST: "${SPECTACULAR_SPLIT_REQUEST-false}"
GRANIAN_RELOAD: "true"
user: ${UID:?Please run me using just.}:${GID:?Please run me using just.}
profiles:
- cube
Expand Down
3 changes: 2 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ django-auth-ldap==4.5.0
PyYAML==6.0.1
whitenoise[brotli]==6.5.0
PyJWT===2.8.0
channels[daphne]==4.1.0
channels==4.1.0
nats-py==2.9.0
granian==1.6.1
git+https://github.com/tfranzel/drf-spectacular.git@refs/pull/1307/head
2 changes: 2 additions & 0 deletions requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ pylint==2.17.5
flake8==6.1.0
isort==5.12.0
pudb==2022.1.3
daphne==4.1.2 # required by (django) channels.testing
granian[reload]
https://github.com/msbrogli/rpudb/archive/master.zip
1 change: 0 additions & 1 deletion requirements/production.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-r base.txt # includes the base.txt requirements

gunicorn==21.2.0

0 comments on commit 747d985

Please sign in to comment.