Skip to content

Commit

Permalink
Use uvicorn locally for full asgi testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend committed Jul 21, 2023
1 parent 84c81d7 commit 36d16fc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 #
Expand Down

0 comments on commit 36d16fc

Please sign in to comment.