Deploying Django with Docker Compose, Gunicorn and Nginx
Video Statistics and Information
Channel: Dot JA
Views: 22,658
Rating: undefined out of 5
Keywords: django, deploy, docker, dockercompose, gunicorn, nginx
Id: vJAfq6Ku4cI
Channel Id: undefined
Length: 15min 59sec (959 seconds)
Published: Thu Nov 19 2020
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
Any reason to use Gunicorn over uWSGI or the other way around?
Thank you so much for this! I've been building something similar with this same exact stack.
I have zero knowledge on nginx so I just copied yours (and so far it works).
May I have a question, though?
I only have one static file which is
main.css
and it is located in /mydjangoapp/static/The application works just fine when I run via
python manage.py runserver
but usingdocker-compose up --build
, themain.css
does not load. The terminal says:What do I need to change to fix this?
I tried changing the yaml file to have
static: /mydjangoapp/static
but it didn't work. I also have no idea how to configure the nginx conf file.For reference, if I do
docker exec -it container-name ls
, the directory /mydjangoapp/static/ is existing.Thanks for the tutorial!
thanks for much awaited tutorial <3