Тёмный

Containerizing Python web apps with Docker, Flask, Nginx & uWSGI 

Julian Nash
Подписаться 12 тыс.
Просмотров 135 тыс.
50% 1

Tutorial - pythonise.com/feed/flask/buil...
In this video, we'll be building a basic Flask web application using Docker, Nginx and uWSGI, along with learning some of the basic concepts of Docker and Docker compose
Enjoying this type of content? Head over to my website at pythonise.com for full length text based tutorials, courses and guides.
Want to help me make even better content? You can by supporting me on Patreon! / juliannash

Опубликовано:

 

20 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 195   
@ericli8461
@ericli8461 5 лет назад
Very awesome tutorial!! I have checked over many online docs or videos regarding dockerizing the flask & nginx application. Yours is by far the most easy-to-follow and clearly structured one. Thanks!
@subhadippahari1244
@subhadippahari1244 4 года назад
nothing to say, except mind-blowing content and teaching style. I try to find this for weeks, at last, got it. keep it up, man.
@acortis
@acortis 5 лет назад
Hello there, great videos (saw the entire series), definetely underrated channel. Keep it up bro.
@juansidberry4422
@juansidberry4422 3 года назад
This is GREAT. You have explained what a developer would actually do step by step to get an app to containerization and production. I can now containerize my applications logically and simply in a very structured manner. THANK YOU! I will now watch the rest of your videos. Really appreciate your work here. Please keep sharing.
@felixmeyer4360
@felixmeyer4360 4 года назад
Such an amazing video! just spent 3 hrs banging my head against the wall with apache and I love this process!
@experimental_av
@experimental_av 4 года назад
hey thanks for the tutorial. i was running into issues with my project and looked at a couple of step by step instructions and yours really stands out as the best.
@davidmakowka922
@davidmakowka922 4 года назад
This is what you do to get new subscribers. Wish everyone would keep this level of quality of videos. Really like your content
@bostevens236
@bostevens236 3 года назад
I really like how you kept it basic, and EXPLAINED the basics. Well done!
@houmie
@houmie 4 года назад
Amazing tutorial. To the point, without making it sound too complicated.
@tironxxx
@tironxxx 2 года назад
Best guides on "Flask" topics on "RU-vid". Thank you.
@golfstallion1354
@golfstallion1354 2 года назад
This was a very useful video. It got me up and running in docker and docker-compose. Thank you for sharing Julian.
@dshefman
@dshefman 4 года назад
I too have been trying to find this kind of content for weeks! Thank you.
@jussivisapaa1826
@jussivisapaa1826 2 года назад
Thanks for this great tutorial! - Straight forward in a good speed. Solved some of my issues with docker/flask
@sainbayarbattur4348
@sainbayarbattur4348 3 года назад
Brilliant series of videos. I certainly wish I’d found them earlier! Thanks very much.
@ramaswamym7309
@ramaswamym7309 5 лет назад
Thank you so much Julian. It's extremely helpful for me to understand the overall concept. Keep rocking bro :-)
@SamAndrew27
@SamAndrew27 2 года назад
Best Docker & Flask tutorial I've found! Thanks dude :D
@hotharvey2
@hotharvey2 3 года назад
on par with the legend Corey Schafer here. Really helped me nail the overall idea and implementation of docker-compose. Will be donating to you once I get a job lol
@zenahrb8316
@zenahrb8316 4 года назад
got yourself a new sub. Absolutely stunning delivery!
@DorZ1983
@DorZ1983 2 года назад
Best tutorial video I've watched on these subjects. thank you for that.
@dannisisgt
@dannisisgt 3 года назад
Thanks Julian, I watch once and then another time your videos, it help me so much with because they are very informative and fundamentals, I tried to run this example and I found an issue with uwsgi installation in python3.8, after read many blogs finally found a workaround, we can install the module pyuwsgi, please continue with your videos
@ram1879
@ram1879 3 года назад
Excellent video!! I'm trying to add pulling code from GitHub in the compose file. Thank you so much for getting me started. I was able to build my fully working flask app using mysql as the back end in less than 2 minutes. So that is db, app and nginx in less than 2 minutes! Thank you!
@kevinmbtbass
@kevinmbtbass 5 лет назад
Extremely helpful! Would you be interested in making a video on implementing TLS with this kind of architecture?
@Virdevir
@Virdevir 3 года назад
Outstanding video ! Thank you! Looking forward for new videos.
@rasanjayasubasinghe2454
@rasanjayasubasinghe2454 2 года назад
@Julian, Very awesome tutorials and hope you will start continue with the new content.
@danielstadler3390
@danielstadler3390 4 года назад
I subscribed because you are criminally under-subbed. Excellent tutorial.
@davidpaez_co
@davidpaez_co 4 года назад
17:50 "Building an image" was actually correct. You first build an image and then create and run a container based on that image. Great tutorial. Thank you Julian
@joaovictorpereirarocha33
@joaovictorpereirarocha33 4 года назад
Great Tutorial. I learned a lot of things. Thanks!
@Ignalvarez
@Ignalvarez 4 года назад
Great job Julian!
@whereisyourjohnie4026
@whereisyourjohnie4026 4 года назад
This is a really clear tutorial! Thanks!
@drakhlur1
@drakhlur1 4 года назад
Hey man, thanks for the great tutorial. It helped at lot! For the next video, could you please explain how to add a Redis container to act as a queue for the requests coming into the web app?
@akramsystems
@akramsystems 9 месяцев назад
Keep up the amazing work
@eli.malka.youtube
@eli.malka.youtube 3 года назад
Julian thanks for the video puts things into order.
@srir7249
@srir7249 3 года назад
This is such a great video. Would you also be able to explain how a container would be able to write into a database server.
@fortis-lt
@fortis-lt 4 года назад
You help me well! Thank you for the guide!
@PREC0GNITAVE
@PREC0GNITAVE 3 года назад
thanks for this Tutorial it has helped me a lot. What would I need to change if I wanted to run the Nginx container and flask container on separate machines? I assume modifying the nginx.conf file to point at the ip of the flask machine, would uwsgi_pass still be uswgi_pass flask:8080 though?
@Dennis-us6zd
@Dennis-us6zd 2 года назад
Hi Julian, thanks a lot for sharing this insightful vid. Could you also please show how this could be done with an additional database service and a front end service? Say a Postgresdb folder and a react folder with typescript code in it? Thanks !
@joc0n647
@joc0n647 Год назад
That saved my life. Great Tutorial
@donaldstrubler3870
@donaldstrubler3870 4 года назад
Outstanding explanation.
@angshumanbardhan3729
@angshumanbardhan3729 2 года назад
Thank You for making this video
@timsavory9718
@timsavory9718 3 года назад
Hi Julian, Great Tutorial. Do i really need to add the nginx part if deploying to a Synology NAS which already has nginx web server and reverse proxy set up on? Thanks Tim
@leemerchant9231
@leemerchant9231 3 года назад
Seriously good video. Thanks!
@vasylcf
@vasylcf 5 лет назад
Thanks, good guide and clear explanation )
@roberthmejias
@roberthmejias 4 года назад
Awesome!!! its so great, this one works for me ... thanks so much
@guilhermeoliveira5499
@guilhermeoliveira5499 4 года назад
AAwesome! Thank you! Helped me a lot!
@soumyasen8353
@soumyasen8353 5 лет назад
Have a question, how to pass the request header and request body through nginx
@scoa_dev8551
@scoa_dev8551 3 года назад
Loved this vid. Thanks!
@anderssegerlund818
@anderssegerlund818 2 года назад
Super helpful guide. But is there a way to implement hot-reloading to avoid restarting the container when making an update in the flask app
@gauravshah8554
@gauravshah8554 2 года назад
Thanks for the great tutorial.
@bhupenderbhardwaj6991
@bhupenderbhardwaj6991 2 года назад
Great content always!!
@muhammad.rafi2012
@muhammad.rafi2012 4 года назад
simply awesome , thanks for sharing
@solrachincapie
@solrachincapie 2 года назад
Excelente Julian... Muchas gracias me ayudaste bastante...
@khlchs2231
@khlchs2231 4 года назад
thank you very much , do you have a tutorial on how to deploy multiple models on server ,? , not just one model ,
@victorherrera4527
@victorherrera4527 3 года назад
Thank you for the tutorial! Is it possible to run both Nginx and uWSGI in the same container?
@gargantuan4696
@gargantuan4696 4 года назад
You could link a local volume instead so you don’t have to rebuild the container on every change, simply refresh
@davidsanusi8982
@davidsanusi8982 5 лет назад
Hi Julian, This has been a very helpful walkthrough. Can you release a guide for how to combine both nginx and uwsgi in the same container? I know this might not be ideal, but this is what I want to achieve. I am currently taking a look at using supervisord but not been able to get it to work yet.
@Notworking1243
@Notworking1243 5 лет назад
I found this to be helpful github.com/tiangolo/uwsgi-nginx-flask-docker/
@robp8468
@robp8468 4 года назад
Great tutorial. It would be great if you could make another part on how to deploy this on AWS.
@salmankazi5308
@salmankazi5308 4 года назад
Hey Did u find a way to upload flask app to aws
@huitangtt
@huitangtt 4 года назад
Great tutorial! I love it and helped me a lot~~~
@scotter
@scotter 3 года назад
Wow. So thorough and easy to follow. Thank you!!! Questions: (1) How do we differentiate apps? Am I correct in assuming when each app has its own container, all except ports (and of course our python program itself) can be the same file names, as long as our primary change is to name the root folder "FLASKAPP" something different for each container? (2) What if we have different domain names pointing to each different app, how do we direct those domain names to the correct app? Does all this work on a Windows server? I assume so, because I have nginx running on my Windows 2019 server. (3) If I already have Postgres running on the same server and my ONE python app running fine using that Postgres server, do you recommend tying Postgres into the docker containers somehow? I assume my Postgres server doesn't have to be containerized? THANK YOU!
@BiranchiNarayanNayak
@BiranchiNarayanNayak 4 года назад
Can you please make another video on how to run multiple python apps on Docker running on different ports ?
@scoa_dev8551
@scoa_dev8551 3 года назад
Biranchi Narayan Nayak Just make a new app then port it port 3000 and just reference it.
@dannys1613
@dannys1613 5 лет назад
Can you show us totorial how to setup WSL and VS Code because i cant set the PATHs etc I can only setup the WSL terminal but how i can use my WSL python in vscode or i need to install it on windows too
@ronaldronald8819
@ronaldronald8819 4 года назад
I totally enjoyed your tutorial. Question: I run docker on a Raspberry pi and like to test remote using the pi's ip instead of the localhost can that be done?
@brunodonascimentomaciel9984
@brunodonascimentomaciel9984 4 года назад
You can use a ssh tunnel.
@glanismonteiro5126
@glanismonteiro5126 4 года назад
sir, what key do you press to auto generate dockerfile contents in vs code?
@xfabiosoft
@xfabiosoft 5 лет назад
I good improvement is to use docker volumes during development. So you don't have to build new containers every time
@iwoz
@iwoz 4 года назад
great video.can you make a video for debugging flask inside the container with VSCode
@mehmetaliozer2403
@mehmetaliozer2403 4 года назад
awesome tutor, could you deploy a flask app on digitalocean droplet with docker and using a custom domain
@pial2461
@pial2461 4 года назад
saved my day mate!
@chandankumaryadav2505
@chandankumaryadav2505 3 года назад
Rest its an awesome video and very intuitive .Thanks Man \m/
@sagarchoudhary8080
@sagarchoudhary8080 2 года назад
really very helpful thanx a lot :)
@noli-timere-crede-tantum
@noli-timere-crede-tantum 4 года назад
Thanks for the video. Small clarification: one does not build "containers"; one builds "images" which can be ran as containers. #languageIsKey
@cartmanhz
@cartmanhz 4 года назад
Exactly, containers built with docker run or create.
@ramchunduri1822
@ramchunduri1822 3 года назад
Thanks! it's helpful.
@1endell
@1endell Год назад
Thank you, man! One question: the uwsgi_params file must be in the app folder?
@joey0827GandD
@joey0827GandD 4 года назад
Oh damn the sound his keyboard makes is really satisfying... can anybody figure out what or what kind of keyboard he uses (eg. mechanical, non-mechanical)?
@iwoz
@iwoz 3 года назад
Great content. Can you please make an advanced version of this topic
@yaseraa2884
@yaseraa2884 4 года назад
Thank you so much, keep going
@yassinerh7709
@yassinerh7709 4 года назад
Thank you very much, mate :)
@mauromatsudo1910
@mauromatsudo1910 2 года назад
What about if I have static files? Which are the best container to store them?
@xanderx8289
@xanderx8289 5 лет назад
How are you using that Hyper? Is it on top of Powershell but with Unix commands? I don't quite get it.
@Schattenschritt62
@Schattenschritt62 4 года назад
Windows Subsystem for Linux
@thevijayraj34
@thevijayraj34 3 года назад
Actually we can do updating the codes without rebuilding it. Just need to mount the dev folder with port binding in compose XML.
@chandankumaryadav2505
@chandankumaryadav2505 3 года назад
While doing docker-compose up, I landed into an issue:- "invalid chmod value: true" for `chmod-socket=true` in app.ini file Probable fix: chmod-socket = 666 (664 can also work for www-data) uid= www-data gid= www-data, updating the above value in app.ini file fixed my issue
@nubiedriver
@nubiedriver 2 года назад
great intro. thks
@hyperupcall
@hyperupcall 4 года назад
would recommend adding ```py links: - python ``` to the nginx field
@israw
@israw 5 лет назад
Why do you use containers instead of the normal way to run nginx and python etc?
@asiddiqi123
@asiddiqi123 4 года назад
So every time I make changes I build it? Why don't you mount volume?
@moha6243
@moha6243 Год назад
Hello Julian, I worked with your tutorial and I have one question how i have to configure the VS-Code Debugger to debug this Setting?
@abhijitambhore
@abhijitambhore 5 лет назад
very helpful
@sssrnty6280
@sssrnty6280 3 года назад
man thanks for this
@imaginarylaurel
@imaginarylaurel 2 года назад
Good job
@Gn0mH4nT3r
@Gn0mH4nT3r Год назад
thank you for your tutorial, it was kind of useful. My question is, how can I put these into one docker image?
@assaultx5677
@assaultx5677 Год назад
I don't know the answer mate but I just want to tell you that he had stop uploading new videos and he's not going to answer your question. You can see his last upload was 3yrs back. May be he just quitted the RU-vid because of poor response or maybe something else. But his videos are really helpful.
@Gn0mH4nT3r
@Gn0mH4nT3r Год назад
@@assaultx5677 well thank you, I solved the issue (with lot of effort), however the good practice the way that is presented in the video (using separate images and containers)
@yomajo
@yomajo 2 года назад
Yeah, question. Say flask app is hosted in cloud somewhere. Say it's containerized with docker. How do you update app when it's live in production?
@opeyemiatoyebi
@opeyemiatoyebi 3 года назад
The video is cool. I tried to connect my docker to my local mysql server, but am getting connection refuse. Any suggestion, please
@yassinezara9641
@yassinezara9641 Год назад
Thanks for this Tuto, it's awesome. the Tutorial link is not working :(
@saurabhramya144
@saurabhramya144 4 года назад
uWSGI does get installed on the windows machine. How did you solve that?
@scorprog
@scorprog Год назад
Hi, nice tutorials. Can you a Flask-SQLAlchemy tutorial.
@shinichi9do
@shinichi9do Год назад
thanks a lot
@filiphavir8376
@filiphavir8376 3 года назад
great video
@juanjosemartinez3762
@juanjosemartinez3762 4 года назад
How add letsencrypt ?
@danieldecasse2924
@danieldecasse2924 2 года назад
cant seem to get UsWGI installed. Im on windows 10. feel like I am something simple. any help is appreciated
@Shrey-G
@Shrey-G 5 лет назад
You got a repo in Github for this?
@Notus29
@Notus29 8 месяцев назад
How would deploy this docker container
@bartekz88
@bartekz88 4 года назад
You deserve for more subs. Definitely
Далее
WSGI for Web Developers (Ryan Wilson-Perkin)
24:52
Просмотров 92 тыс.
СДЕЛАЛА БРЕКЕТЫ ДОМА
01:01
Просмотров 1,2 млн
What it feels like cleaning up after a toddler.
00:40
Deploying Django with Docker Compose
2:24:50
Просмотров 87 тыс.
Flask Load Balancing Using Nginx and Docker
18:39
Просмотров 32 тыс.
How to create a great dev environment with Docker
29:55
FastAPI, Flask or Django - Which Should You Use?
9:49