Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace daphne with granian #588

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading