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