From 36d16fc5a1280b1ae21505a2e20dfca508c99a4e Mon Sep 17 00:00:00 2001 From: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com> Date: Fri, 21 Jul 2023 13:29:12 +1000 Subject: [PATCH] Use uvicorn locally for full asgi testing --- api/Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 78d61b2b2b0..800ae78e398 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -101,7 +101,6 @@ COPY --chown=opener . /api/ # Collect static assets, these are used by the next stage, `nginx` RUN env \ SETUP_ES="False" \ - STATIC_ROOT="/static" \ DJANGO_SECRET_KEY="any string" \ python manage.py collectstatic @@ -117,8 +116,8 @@ EXPOSE 8000 3000 # Wait for ES to accept connections ENTRYPOINT ["./run.sh"] -# Run Django dev server, can be overridden from Docker Compose -CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] +# Run using uvicorn for development. Production should run gunicorn with uvicorn workers. +CMD ["uvicorn", "--reload", "--host", "0.0.0.0", "--port", "8000", "conf.asgi:application"] ######### # NGINX #