.NET 7 💥 -- How to containerise Web API with Docker & use PostgreSQL

  Рет қаралды 40,070

Mohamad Lawand

Mohamad Lawand

Жыл бұрын

In this video we will be going to be containerising a .NET 7 API with PostgreSQL and Docker Compose
Support me on Patreon to access the source code:
/ mohamadlawand
Let us connect:
🌍 My website - mohamadlawand.com
📸 Instagram - / mohamadlawand087
🐦 Twitter - / moe23
♯ Github - github.com/mohamadlawand087
🎫 LinkedIn - / mlawand
💥 LinkTree - linktr.ee/mohamadlawand
Gear I use (affiliate link): amzn.to/3EbT8Jw
Support my work:
/ mohamadlawand
www.buymeacoffee.com/mohamadl...
Hire Me:
transactions.sendowl.com/prod...
WHO AM I:
I'm Mohamad, a Enterprise Architect working in Manchester, UK. I make videos about web, cloud, desktop and mobile development.
GET IN TOUCH:
If you’d like to talk, I’d love to hear from you. Tweeting @moe23 directly will be the quickest way to get a response, but if your question is very long, feel free to email me at hello@mohamadlawand.com.
#dotnet #postgresql #docker

Пікірлер: 65
@100kshooter5
@100kshooter5 Жыл бұрын
Thank you so much Mohamad for such great content, have put notification on!!! Much love from South Africa!
@proffnick2405
@proffnick2405 4 ай бұрын
Thank you Lawand. Your lecture is clean, clear and concise
@alihamzaansari2012
@alihamzaansari2012 7 ай бұрын
your explanations are really understandable and with a good pace
@Ertan_Taner
@Ertan_Taner 11 ай бұрын
Thank you Mohamad, ı made a compose file for my backend api + db + redis service and it's working without a problem. I am learning so many stuff from you. I used Dockerfile and wants to learn a bit about compose. Thanks so much again ^^
@Shanks-at-Work
@Shanks-at-Work 5 ай бұрын
This is so helpful with step by step explanation. Thank you so much.
@syneticsolutions344
@syneticsolutions344 Жыл бұрын
Absolutely fantastic video, very well done!
@SonyaSakayev
@SonyaSakayev Жыл бұрын
Thanks for the detailed explanation!
@99aabbccddeeff
@99aabbccddeeff 7 ай бұрын
Thank you for such informative videos!
@simontouma7924
@simontouma7924 8 ай бұрын
Great video as usual!
@agustinbcu
@agustinbcu Жыл бұрын
Awesome video, I will love to see a Dev environment vs stage, and production environment; the database upgrades thru the EF core migration script, and the implications of always getting the latest version of the database. Overall well presented. Mine only advises having all the commands on an editor and copying and pasting.
@xender2112
@xender2112 Жыл бұрын
Thank you so much. It's so useful. Especially the part where database migrations inject in the db container. If not you, instead of 1 day I'd spend 1 week or more to containerize my project.
@lifeisbeautifu1
@lifeisbeautifu1 7 ай бұрын
Amazing! Thank you! ❤🔥
@chinmaykaviskar5757
@chinmaykaviskar5757 3 ай бұрын
Thank you so much Lawand. It's bcoz of you I was able to learn about docker and execute it. Bigg help
@elliotaldersone4969
@elliotaldersone4969 11 ай бұрын
Great tutorial thanks a lot Mohammed
@sumeshsidharth3255
@sumeshsidharth3255 Жыл бұрын
Thank you for the great video.
@user-tj2by9zp6c
@user-tj2by9zp6c Жыл бұрын
Thank you very much for intersting and useful information!
@patricksantos9309
@patricksantos9309 5 ай бұрын
Thanks, helped me with the migration
@guillesanchez493
@guillesanchez493 Жыл бұрын
Thank you very much!!!
@manssternerbostrom3148
@manssternerbostrom3148 8 ай бұрын
Beautiful walkthrough!
@MohamadLawand
@MohamadLawand 8 ай бұрын
Thank you! 👍
@ivandrofly
@ivandrofly Жыл бұрын
11:48 Connection string 36:54: Docker compose creation 41:00 Setting the connection string on docker-compose 41:10 menitioned that he connections tringwill be auto-injected into app 50:17 : API testing tool Insomnia (like Postman) Remarks: Why the environment variable name in docker compose is not the same as in appsettings
@stoic2454
@stoic2454 Ай бұрын
Thank you soooooo much, I was stuck on this step, i never realized i'm using production evn and kept on thinking why i'm not getting swagger, lol
@mirkozaper
@mirkozaper 5 ай бұрын
52:03 thanks for video and please do video with first option (migration to run automatically)
@afonsocarvalho3124
@afonsocarvalho3124 2 ай бұрын
I need some guidance on running migrations automatically too. If you have a real project with too many tables, doing manually is very time consuming, and the migrations are already there ready to be applied. Thank you for this video.
@bryanfatjo3188
@bryanfatjo3188 Жыл бұрын
hey Mohamad good job.😀 I found your explanation really good some time I needed some subtitles, but even the automated subtitles were saying that is music. Doesn't matter still get >95%. Saludos Cordiales
@barchilsaid3001
@barchilsaid3001 6 ай бұрын
Thank you so Much .
@MegaMaistro123
@MegaMaistro123 8 ай бұрын
you nailed it bro ربنا يجازيك كل الخير يارب
@MohamadLawand
@MohamadLawand 8 ай бұрын
أمين مشكور والله
@wolfVFXmc
@wolfVFXmc Жыл бұрын
Would be handy if you make a video about the migrations being run automatically
@mosheritterman3472
@mosheritterman3472 9 ай бұрын
Great tutorial! Do you have another video where you demonstrate how to deploy this to production (i.e. Azure or AWS)? Also, how would you add your docker-compose file in source control (i.e. GitHub) so that the connection string is secure?
@user-xc9zv1cd3z
@user-xc9zv1cd3z 3 ай бұрын
Best!
@user-ky1zu4cl9u
@user-ky1zu4cl9u Жыл бұрын
Awesome video as always. Should SDK commands be executed inside a Docker container rather than within a directory on the local machine? When I try, I get a message that the SDK is not installed within the container. Thanks
@HilalYazbeck
@HilalYazbeck Жыл бұрын
great stuff, can you create a video about dotnet core clear architecture (onion) with a simple repository pattern and unitofwork? i would love to see your approach
@rogerstich7603
@rogerstich7603 7 ай бұрын
very nice Tutorial, thank you for that. One question: How to do all the Connection String Magic properly, so i dont have them inside my Dockerfile and finally in my Git Repo?
@williampuma8241
@williampuma8241 7 ай бұрын
awesome
@jmejias00
@jmejias00 Жыл бұрын
Great video. Do you have a github repo for this tutorial?
@RoyZASTEROiD
@RoyZASTEROiD Жыл бұрын
thank you
@jesusmendoza6536
@jesusmendoza6536 Жыл бұрын
Super nice!!!!!!! Thanks How we can run migrations automatically un docker-compose.yml file?
@adam-xt8te
@adam-xt8te Ай бұрын
35:25 I stuck at this moment and I can't force API to throw those exceptions. In browser I got 404. I'll try later. Effects in the end are worth trying. Thank you for your effort
@leleca987
@leleca987 5 ай бұрын
brabooo
@prasangupta2978
@prasangupta2978 4 ай бұрын
Do i have to create a docker container prior to adding this
@rustam_gasymov
@rustam_gasymov Жыл бұрын
It's powerful!! Can you say please how can i debug(in vscode) my application when I run using docker compose?? Or somebody knows? Thanks a lot
@stesvis
@stesvis 3 ай бұрын
Did you push this to some repo? Would be nice to browse the code! Thanks
@oleksiihytsiv
@oleksiihytsiv Жыл бұрын
How can he actually create migrations with an empty connectionString? When I tried that, I got an error: The string argument 'connectionString' cannot be empty.
@fkbey5756
@fkbey5756 Жыл бұрын
Thanks
@raptoverdad
@raptoverdad 9 ай бұрын
thanks for leaving the code in... wherever it is.
@diegomelgar2696
@diegomelgar2696 6 ай бұрын
Hi Mohamad, Is it possible that you create a video for containerise the same application but running on HTTPS as development environment. I am facing some issues that I haven't found a proper solution. The API doesn't run because of missing certificates. After properly setup the certificates using dotnet dev-certs and dotnet user-secrets and mapping the volumes inside docker-compose I still have the problem. Thanks!
@shade9200
@shade9200 9 ай бұрын
You're a god
@andresviera-ecuador4984
@andresviera-ecuador4984 4 ай бұрын
Good afternoon, so I have a problem starting my applicattion is this error "warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3] Failed to determine the https port for redirect."
@csabagyarmathy6386
@csabagyarmathy6386 7 ай бұрын
Saved my ass, thank you!!!
@MohamadLawand
@MohamadLawand 4 ай бұрын
Thank you for your support
@shivpratapshukl1445
@shivpratapshukl1445 Жыл бұрын
Hi mo, can you make tutorial for .net microservices.
@yosterdaniel1213
@yosterdaniel1213 Жыл бұрын
I agree
@TALHAEDITS906
@TALHAEDITS906 Жыл бұрын
One good practice (always) should be, even in demos, always use real world production code, so that even a beginner can learn the real world code, do a purpose build demo, not just for "simple demo". Don't do what 99% of other online tutors are doing (just demo purpose tutorials). There are tutorials for beginners, but not for experienced ones. Don't they need some advance level expertise? Also, can you make a demo on calling 500-1000 APIs at the same time and just wait for the ok 200 response.? What would be the best practical approach? I am asking you as you are the enterprise architectect.
@xender2112
@xender2112 Жыл бұрын
His demos are not real world projects but they are more complex than an usual demo. At least his demo in this video has database. It's enough to understand how to create and then to connect services by virtual network interface.
@bhound12
@bhound12 Жыл бұрын
Not everyone would agree with you. I got exactly what I wanted from this video, as did many other viewers. The video is concise and delivers on exactly what the title says.
@yosterdaniel1213
@yosterdaniel1213 Жыл бұрын
Any one else getting this error at the end when sending a get request "The ConnectionString property has not been intilaized "?
@ivandrofly
@ivandrofly Жыл бұрын
vaar con = Environment.GetEnvironmentVariable(
@keithcarrillo8238
@keithcarrillo8238 Ай бұрын
24:49
@Tymonello
@Tymonello Жыл бұрын
v3 :)
@creamOnDs
@creamOnDs 10 ай бұрын
i think it would be better if you explain the code while showing the code, I keep moving back to where you show the code after listening to your explanation
@Pan_Policjant
@Pan_Policjant 8 ай бұрын
dude, your face is covering most of the things you do
@alexanderbondarchuk
@alexanderbondarchuk Жыл бұрын
Thank you very much!
.NET 7  💥  - Deploy .NET Apps to Kubernetes
51:38
Mohamad Lawand
Рет қаралды 17 М.
Watermelon Cat?! 🙀 #cat #cute #kitten
00:56
Stocat
Рет қаралды 36 МЛН
WHY and HOW to Add .NET Aspire to ANY .NET API and Web App in Minutes
22:02
Docker and PostgreSQL in [10 Minutes]
21:06
Amigoscode
Рет қаралды 264 М.
.NET 6 - Web API Caching with Redis ⏲🌐
1:04:23
Mohamad Lawand
Рет қаралды 32 М.
Deploy a .NET Core API with Docker (Step-by-Step)
36:17
Les Jackson
Рет қаралды 254 М.
Intro to Docker - A Tool Every Developer Should Know
1:16:03
IAmTimCorey
Рет қаралды 207 М.
.NET 6 - Message Broker with RabbitMQ 🐰🐰🐰
1:00:14
Mohamad Lawand
Рет қаралды 46 М.
Запуск ASP.NET Core + PostgreSQL | Docker Compose
30:39
Building a .NET 6 API Using TDD
1:38:59
Wes Doyle
Рет қаралды 141 М.
.NET 7  💥  - ASP.NET Core Web API Filters
49:45
Mohamad Lawand
Рет қаралды 16 М.
Run ASP.NET Core 3.1 Apps in Docker with HTTPS.
1:01:33
Les Jackson
Рет қаралды 85 М.