From 2b4104a819687f1a588f80b78ad4ac904c26eae7 Mon Sep 17 00:00:00 2001 From: poduck Date: Mon, 1 Dec 2025 02:44:51 -0500 Subject: [PATCH] chore(deploy): Update production configuration for ASGI and new URL structure - Switched production start script from Gunicorn to Daphne to support WebSockets. - Updated VITE_API_URL in frontend production env to 'https://api.smoothschedule.com', removing the '/api' prefix to align with the backend URL refactor. --- frontend/.env.production | 2 +- smoothschedule/compose/production/django/start | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/.env.production b/frontend/.env.production index 398f6df..f442165 100644 --- a/frontend/.env.production +++ b/frontend/.env.production @@ -1,3 +1,3 @@ # Production environment variables # Use relative API URL - will use same origin as the page -VITE_API_URL=/api +VITE_API_URL=https://api.smoothschedule.com diff --git a/smoothschedule/compose/production/django/start b/smoothschedule/compose/production/django/start index 53bf12a..efcee29 100644 --- a/smoothschedule/compose/production/django/start +++ b/smoothschedule/compose/production/django/start @@ -7,4 +7,5 @@ set -o nounset python /app/manage.py collectstatic --noinput -exec gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app +# Start Daphne (ASGI) instead of Gunicorn (WSGI) to support WebSockets +exec daphne -b 0.0.0.0 -p 5000 config.asgi:application