Running in Docker | ASP.NET Core 2.2 REST API Tutorial 14

  Рет қаралды 38,483

Nick Chapsas

Nick Chapsas

Күн бұрын

Пікірлер: 39
@babri1402
@babri1402 4 жыл бұрын
Very nice, things are explained very clearly. A video about EF Core migrations & running them on a database inside a container would be sweet. So that when we run docker-compose, the required db is initialized & migrations executed.
@ades3967
@ades3967 4 жыл бұрын
Very pragmatic example! Great explanations as you're typing. Thank you
@Lazzarus7
@Lazzarus7 3 жыл бұрын
Thanks, great explanation, simple and clear and in a short video
@renatorcribeiro
@renatorcribeiro 5 жыл бұрын
Seus videos são muito bons. Aprendo muito com eles. Obrigado por compartilhar seus conhecimentos. Sou do Brasil.
@jeremygraham7786
@jeremygraham7786 5 жыл бұрын
Hey mate, thanks for the great series, enjoying it lots. I came across an issue at this section which I would appreciated your thoughts on. Basically when I spun up the api and sql db with docker-compose, it wasn't applying the migrations to the sql database and therefore wasn't creating a database when running in the container. To fix, I had to force migrations when the api was built in order for it to work... Do you know why I had to force migrations while yours seems to do it automatically...?
@florianrefardt245
@florianrefardt245 4 жыл бұрын
I had the exact same issue. The API was running but the database was not ready because the migration is not executed. I found this solution here to work around it: codebuckets.com/2020/08/14/applying-entity-framework-migrations-to-a-docker-container/
@swaroopshivanna3025
@swaroopshivanna3025 3 жыл бұрын
May be because @nick had written bunch of code in Program.cs to apply migration as the application starts (in his earlier video) and you might not have done that. I am just guessing though I could be totally wrong.
@diale13
@diale13 3 жыл бұрын
Works great with postman but i cant see swagger on the browser, any ideas why? I mean i use the same url (without swagger/index.html) and postman works so docker is ok, no idea why
@fedemartinez98
@fedemartinez98 3 жыл бұрын
The same is happening to me, please help!
@diale13
@diale13 3 жыл бұрын
Fixed it: added this line to docker compose as swagger needs to be running in env. environment: - ASPNETCORE_ENVIRONMENT=Development Great video as allways nick
@fedemartinez98
@fedemartinez98 3 жыл бұрын
@@diale13 Thanks man! The day I get my engineer degree I will remember you!
@naveensemwall
@naveensemwall 4 жыл бұрын
Every thing works fine but not able to browse the hosted api URL in the browser. Like while browsing localhost:9006/api/v1/posts , browser is showing >> This site can’t be reached. I have mapped 9006:80 in docker-compose file. I am using Windows 10 Pro and Docker desktop community edition. Do i need to do some kind of mapping anywhere for this ?
@mguollo1
@mguollo1 3 жыл бұрын
Can't work here, same issue. My browser dont acess localhost:7000. Did you find a solution?
@joepadz2001
@joepadz2001 5 жыл бұрын
very helpful thanks bro.
@sakshock
@sakshock 5 жыл бұрын
Great video ! Thanks!
@psdeep2
@psdeep2 4 жыл бұрын
Thanks for the tutorial. There is warning that data will be lost when we destroy the container. Is there any way to fix data persistent problem?
@JanithWidarshana
@JanithWidarshana 5 жыл бұрын
How about if we need to have basic data to insert. Is it possible to do via docker compose ?
@luizmedina5719
@luizmedina5719 4 жыл бұрын
Hi how implement https in dockercompose ?
@shironii997
@shironii997 5 жыл бұрын
hi nick, great video, i have a little question about the dockerfile in case that the api to run in docker depends of multiple custom libraries, how must i to implement the dockerfile in that case?
@nickchapsas
@nickchapsas 5 жыл бұрын
Hey, can you please elaborate on what you mean by "custom libraries"? Isn't that something living in nuget?
@MarcoLeite
@MarcoLeite 5 жыл бұрын
@@nickchapsas I have teh same isso. My solution has a main project with 2 dependent class libraries
@acousticbrothers1491
@acousticbrothers1491 5 жыл бұрын
@@nickchapsas I think he is asking if you have a "N-Layer" Architecture
@dinand6410
@dinand6410 5 жыл бұрын
Thank you Nick all very helpfull. Only this one did not do the job. Not even with your demoproject. (btw is it possible, next time to have democode per lesson. Now one mistake knocks my code out of all future lessons.) Keep it on, I will stay to enjoy it.
@oguzhan1191
@oguzhan1191 5 жыл бұрын
Hi, did you create the database or docker.yml created the database?
@nickchapsas
@nickchapsas 5 жыл бұрын
The application itself created the database. The Program.cs contains a migration executer
@17madjoker47
@17madjoker47 5 жыл бұрын
Thanks a lot, very usefull video =)
@kalaiselvank7643
@kalaiselvank7643 4 жыл бұрын
hi ,ERROR: Service 'main-api' failed to build: COPY failed: stat /mnt/sda1/var/lib/docker/tmp/docker-builder252996948/Tweetbook.csproj: no such file or directory i am getting this error any usggestion
@annagulina5954
@annagulina5954 5 жыл бұрын
ERROR: Service 'main-api' failed to build: image operating system "windows" cannot be used on this platform What can I do? thank you
@nickchapsas
@nickchapsas 5 жыл бұрын
This happens because you need to switch your docker configuration to be on Linux containers.
@joseantoniosanchesgarcia9220
@joseantoniosanchesgarcia9220 4 жыл бұрын
i don't undertand this part "server=localhost,1400...etc" what is 1400, a port or what?
@nickchapsas
@nickchapsas 4 жыл бұрын
Yeah that's a port
@joseantoniosanchesgarcia9220
@joseantoniosanchesgarcia9220 4 жыл бұрын
@@nickchapsas is it any port?, thanks for your answer
@joseantoniosanchesgarcia9220
@joseantoniosanchesgarcia9220 4 жыл бұрын
@@nickchapsas i got this error, An error occurred using the connection to database 'PlazaCoreMiddle' on server 'DESKTOP-8TUFUVF'. fail: Microsoft.EntityFrameworkCore.Query[10100] An exception occurred while iterating over the results of a query for context type 'PlazaCoreMiddleBack.Data.ApplicationDbContext'. Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
@허재영-u8j
@허재영-u8j 5 жыл бұрын
i wana sample source
Integration testing | ASP.NET Core 5 REST API Tutorial 15
22:13
Nick Chapsas
Рет қаралды 111 М.
The Only .NET Scheduler You Should Be Using!
16:38
Nick Chapsas
Рет қаралды 59 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Docker for .NET Developers
46:09
Docker
Рет қаралды 79 М.
Deploy a .NET Core API with Docker (Step-by-Step)
36:17
Les Jackson
Рет қаралды 260 М.
Dockerize .NET 6 in 10 Minutes
13:33
Wes Doyle
Рет қаралды 153 М.
Response caching using Redis | ASP.NET Core 5 REST API Tutorial 25
23:34
Dockerfile Tutorial - Docker in Practice || Docker Tutorial 10
24:05
TechWorld with Nana
Рет қаралды 236 М.
8 await async mistakes that you SHOULD avoid in .NET
21:13
Nick Chapsas
Рет қаралды 317 М.
I built an Omni-Directional Ball-Wheeled Bike
27:55
James Bruton
Рет қаралды 4,4 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН