Deploying Django with Docker Compose, Gunicorn and Nginx
HTML-код
- Опубликовано: 8 сен 2024
- How to deploy a Django project in a production environment using Docker Compose.
Django is run in production using a WSGI server such as Gunicorn and a web server such as Nginx.
Code on Github: github.com/dot...
Resources:
testdriven.io/...
vsupalov.com/d...
Thank you
Many thanks!
@@djangoroad couldnt agree more. No BS, just good profesional content. Thanks a lot!
This is the most simple tutorial I have seen. I found the mistake I was mounting the wrong config in nginx container. Thank you very much.
without your video I'd have probably thrown my PC out the window by now. fantastic, thank you so so much
This vid is literally godsent, thank u so much!
Thank you very much for this tutorial on deploying Django under Docker, Nginx as reverse-proxy and Gunicron as python web server. Really, it is perfect. Clear and efficient!
serious this was clear nice and correct. thanks @Dot JA ruclips.net/user/DotJA
This content is what I have been looking for, tons of thanks to you, keep going.
Love you! Whoever you are!
Thanks a lot, it would be interesting to see using postgres as there are issues in deploying two containers and the communication between them
one of the integral tutorials i have ever seen on django . thank you so much !
I was planning to go live and here you are 💓💓💓💓💓. I love this lady ❤️❤️❤️
I am learning docker, and this is a gold inform I just got! Thank you for sharing it.
One of the best content, and have quick bytes for ease to understand. Hats off to you. Keep up and make like these contents.
Fantastic video, really helped solidify my understanding (or lack thereof).
Muchisimas gracias!!! llevaba un rato atorado con con Django y sus estilos que no se cargaban, Muchas gracias
This is exactly what i was looking for! I really can't stress enough how this has EXACTLY the information I was looking for! :D thanks a lot!
this was my google search "docker django nginx gunicorn project tutorial" and i was hoping to see the creation of those files to understand what to write in them and why!
That's real knowledge sharing. No begging for subscribers and likes as others do by compromising real knowledge sharing.
Really appreciate, Thanks
Subscribed ✅
Liked ✅
Commented ✅
Thank you I appreciate it.
Omg its amazing, thank you)
Well prepared for the video and straight to the point !
I noticed you don't respond to non-technical questions, So here it is, I don't yet know how to deploy local Django Project to AWS LightSail, You seem like someone knows how to do just that, So if you will, Make a video about it, Happy to learn from you.
explanation is so simple. please make more this type of videos.
Thank you very much for such a clear, elegant and efficient explanation. I was looking for a long time for the most suitable combination for my project and yours was the best, I really appreciate it a lot !!
Thanks.....for guiding on Docker in layman terms.
Te amo!!, muchas gracias!
Crisp and clear … just awesome!!
Briliant. Thank you very much for this tutorial!
I can also say this works fine on windows 10 using WSL2 (linux app on windows). I used docker desktop to login and authenticate, and a Kali linux app to install nginx and then build the docker compose file
Helpful, and your voice is relaxing.
exactly what I'm looking for
you have such an awesome voice
This video is very useful. Thank you so much, Dot JA!
Very much helpful, Keep up the great work!
Explanation is really good
Greatly explained... Thanks a lot
Thank you very much ! I love love your this guide.
This is super useful, saved me so much time. Thank you!
a godsent for my nearing exams!
This video is very clear,thank you so much!❤
Thank you very much. It's works perfect
Short and to the point
Thank you for this excellent tutorial, was super useful!
Thanks for the content! You have a sweet voice ❤️
thank u so much, It's very clear and it's very easy to understand.
💯💯💯simplest nginx config
Very cool, very easy. Thank's a lot for this good explanation (I like it even much more than the linked testdriven.io reference!)
Thanks! I'm glad you liked it.
thanks for that.... really good and useful
Very nice tutorial!!. Thank for this..
I learned a lot from your videos. Thank you!
This is fantastic, thank you dot ja
THIS VIDEO IS AWESOME!!
Since you are creating a docker image, is it necessary to include the creation of a virtual environment within it?
i don't think there is a need for a virtual environment in docker image
Nops
you helped me a lot) thanks for useful info and pretty voice!
thanks a lot, it works perfectly!
Fantastic tutorial!!! Huge thanks!!!
Nice tutorial, thanks!
Fantastic, straight to the point. Thank you.
Thank you so much! You're awesome!!!!
perfect! thank you very much!
Amazing, it was really short nice and simple way of explaining whole scenario. Thanks a lot. 👀 You just made me to hit the subscribe button.
It is great! Thank you very much!
Great explaination
nice :) super clear video!!! Thanks a lot............
Great vedio with clear concepts thanks a lot really helped me a lot :)
Love your voice
I should have found this sooner. Best tutorial in this regard so far. Do you mind making a tutorial for GitHub actions building this image and pushing it to docker hub?
Hi, thanks for the feedback! I've a video about Github Actions here ruclips.net/video/oCu3_JKsYYc/видео.html
Maybe you'll find it useful.
Amazing, thank you so much.
Thanks you so much!
Wow you are excellent 😍😍
Hey, thanks for teh video, but am getting this error , 'nginx: [emerg] host not found in upstream "django_gunicorn:8000" in /etc/nginx/conf.d/default.conf:2', What could be my mistake
hi there, I have been having this same problem, did you end up finding out?
awesome and clear, thanks
Thanks so much
Nice and clear. 👌👌
Hello, really really nice video on django and docker deployment beats the 2hrs long some videos I have come accros on youtube. One question though, running this example on a remote server, will the gunicorn expose the django project to the remote host? Or how to do this on a remote host and use this like an actual deployment.
Very nice. Fantastic
Very informative video, kinda life saver :)
Great content! What about setting up domain and let's encrypt SSL to ubuntu server?
That would be great!!
Thank you for your clear tutorial. It's really helpful. I would like to ask what if you don't want to expose gunicorn 8000 to outside, just via Nginx. How can we limit that?
You should also shown the static content for the page because i followed tut and loading the admin site static file not for templates
thnx so much....
Thanks for this
First of all Thank you very much for the good content. I have a question about not found /static/admin/css/base.css how to fix it
Sorry but I missed something, I expected to be able to login in the admin but I do not manage. I guess I am overlooking something stupid because your presentation is very precise and informative.
No worries, I think you need to create a superuser. This is usually done using 'python manage.py createsuperuser' but there are ways to do that programmatically so that it would be ready for you to use when you spin up the Docker container.
@@djangoroad ok, so if I understand it correctly that should be an additional run instruction in the dockerfile?
Yes in the case where you want everything to come into existence when you spin up the containers. This might be useful: stackoverflow.com/questions/30027203/create-django-super-user-in-a-docker-container-without-inputting-password
You are awesome!
ey men, can you do a video that explain how deploy django whit ngnix, daphne, docker and kubernetes
It was amazing!
Thanks for amazing content. Just one question, how can we configure redis and celery with this project..?
I will try to make some content on that in the future.
@@djangoroad Thanks so much
Please, make a video tutorial using traefik + django + gunicorn + nginx
Those who face problem while spinnig up container , replace below line FROM nginx:1.22.0-alpine
on nginx docker file
Nice
Nice tutorial, What about I have a ubuntu server running nginx, so If I open the port 80 of the container on port 80 of the server shouldn't I get error? Can't we just pass the static files path in Gunicorn?
Realy fantastic video but what about database configuration plz
Can I use nginx to serve media file? I mean, media uploaded by user
My static files are not loading. I followed the same and very precise with giving the location of static files and volume mapping. Can anyone help me on that part?
Hello! I can only enter my app from port 8000, without the position as you do, I get an error 504
How should I stop this 8000 port? my code is running in 80 and 8000 then it is not good practice
I follow your tutorial and made some changes. I used only one container for gunicorn and nginx. But one problem I am facing is after calling gunicorn in entrypoint.sh upcomming next command not working. Fot that reason my nginx not starting I have to start nginx manually. Any Suggestion from your side?
hi my static files are not served can you please guide me for this.
Do you want to have a look at the repo on Github github.com/dotja/django-docker-compose
tnx
Hi. It works well for me but I can't see the volume or images when I run `docker volume ls` or `docker images`. It works fine and can clearly see in the logs that the images are created but I don't know why I can't see the volume or the image.
Already resolved.
I just need to do "sudo" in every command and everything works well.
Thank you!
Thanks for the contents,
I am facing one problem
I have a one data folder in project directory. It contains some files that requires for running some apps reading data from that files.
Should I keep that files in django container or create another volume for the files?
A docker volume is used for persistent data for example any data that your app generates or modifies and that you want to preserve.
ModuleNotFoundError: No module named 'myown_nproject' after docker-compose up,, can you help me?