How to Dockerize NestJS with MySQL

  Рет қаралды 15,421

Anson the Developer

Anson the Developer

Күн бұрын

Пікірлер: 40
@brunobragaw8t
@brunobragaw8t 8 ай бұрын
The explanation on mounting the /src finally made it clear for me on how to develop locally with Docker. Thanks a lot.
@Palonchi-n1t
@Palonchi-n1t Ай бұрын
I was struggling to understand the actual responsibility of the docker, how to use it and so on... but now, I think I am in love with docker. Thank you very much!!!!
@mohammadpartovi1813
@mohammadpartovi1813 22 күн бұрын
Thanks a lot Anson. You have an extra ordinary talent in teaching and explaining topics. Keep up the amazing work and looking forward to seeing more of your content. Cheers.
@jagadeeps3095
@jagadeeps3095 10 ай бұрын
the best dockerize video i have ever seen. Thank you so much Anson for this straight forward and clean explanation👍👍
@Daker11Gamer
@Daker11Gamer 8 ай бұрын
WOW! Super underated video this gotta have a million views this is gold!
@kellslte
@kellslte 10 ай бұрын
I love this tutorial. So straight to the point! Thank you! 🎉
@juanmacias5922
@juanmacias5922 10 ай бұрын
Thank you so much for another solid tutorial Anson. I was toying with the idea of looking into Docker.
@dileepa-mn2to
@dileepa-mn2to 10 ай бұрын
Thank you brother. Love this
@edwinchan8190
@edwinchan8190 5 ай бұрын
Very clear and concise video on dockerizing nestjs app, thanks so much!
@dr-Jonas-Birch
@dr-Jonas-Birch 10 ай бұрын
Excellent video. JB
@amritniure465
@amritniure465 4 ай бұрын
If anyone is facing the trouble " Error: Cannot find module '/usr/src/app/dist/main " . You can change the start:prod script in package.json to: "start:prod": "node dist/src/main", it is because the main file inside the container is inside the /usr/src/app/dist/src/main> I don't know the reason behind this. It must be something related to the tsconfig file. If you go check the files under the container the main file is in /usr/src/app/dist/src/main so, that works. Basically you need to provide the path of the main.js file of your container in your package.json file. If you try to build the application without docker ( in terminal ) after changing the path it won't work again because in dev environment the main file is inside the dist/ folder so hope you got the drill.
@bradpreston9872
@bradpreston9872 3 ай бұрын
Thank you! You saved me a good amount of debug time.
@Bregylais
@Bregylais 6 ай бұрын
Beautifully explained, thank you.
@_kenJ
@_kenJ 4 ай бұрын
thaks bro, a wasnt understanding to much the volume of docker and a finally undestood this part of docker. And also i finally can code with docker
@ehSamurai3483
@ehSamurai3483 6 ай бұрын
In docker compose you can add a dependency to mysql, so it will first start mysql before starting the nestjs server.
@ansara4729
@ansara4729 4 күн бұрын
thanks a million, awesome explanation
@tavindersingh8185
@tavindersingh8185 27 күн бұрын
Whats the difference in RUN and CMD command? if command like this `RUN npm run build` is possible then why added `CMD [ "npm", "run", "start:prod" ]` why not `RUN npm run start:prod`?
@dileepa-mn2to
@dileepa-mn2to 10 ай бұрын
can you create a video about e2e and unit testing in jest in nestjs covering all the aspects of testing. Thanks
@ansonthedev
@ansonthedev 10 ай бұрын
I have. Check my NestJS playlist. kzbin.info/aero/PL_cUvD4qzbkw-phjGK2qq0nQiG6gw1cKK
@AdnanDev-su5no
@AdnanDev-su5no 10 ай бұрын
Hi Anson, could you show us what vscode extensions you are using for your projects ?
@bbrother92
@bbrother92 25 күн бұрын
Is NestJS popular? Does heavy load services use NestJS ?
@FrankYupanquiAllcca
@FrankYupanquiAllcca 5 ай бұрын
I got an "TypeError [ERR_STREAM_NULL_VALUES]: May not write null values to stream" at "npm i" instruction. How can I fix it?
@wisdomekpot7426
@wisdomekpot7426 3 ай бұрын
I love this tutorial.
@NeerajTangariya-o7b
@NeerajTangariya-o7b 10 ай бұрын
Hi I have one question how can i check the databasemeans table and all?
@jagajaga6908
@jagajaga6908 7 ай бұрын
thank you bro, very nice tutorial!!!
@ansonthedev
@ansonthedev 7 ай бұрын
You're welcome!
@ferrywijaya6404
@ferrywijaya6404 10 ай бұрын
hello sir thanks for the video again may i request a real world example using nestjs as backend and angular as front end. thanks you before
@davidkhvedelidze6536
@davidkhvedelidze6536 6 ай бұрын
greate totorial ! thanks
@Songpon-wc2ob
@Songpon-wc2ob 2 ай бұрын
thank
@bonchan4404
@bonchan4404 8 ай бұрын
hello anson . thanks for this video . im following your video but im having a problem on the hot reload on the tsconfig.json its not working . im using the latest typescript version on the dev dependencies
@ansonthedev
@ansonthedev 8 ай бұрын
I would double check the volumes and make sure they are mounted correctly. If you're on Windows make sure the watchOptions in the tsconfig is configured correctly... Here's a Stack Overflow link that may help - stackoverflow.com/questions/74815121/why-is-hot-reloading-not-working-in-my-nestjs-docker-compose-multistage-project
@bonchan4404
@bonchan4404 8 ай бұрын
@@ansonthedev thanks for this anson ! started watching all of your nest js videos because im starting to a new company and nest js is one of their stack ! . really love the way you teach to code its like watching traversy media . again thank you !
@codewithashok10
@codewithashok10 10 ай бұрын
Bro please make a video express js with typescript
@kumaramresh7905
@kumaramresh7905 9 ай бұрын
I am getting Error: Cannot find module '/src/nest/dist/main' my dockerfile FROM node:alpine WORKDIR /src/nest COPY package*.json . RUN npm install -g @nestjs/cli RUN npm install COPY . . EXPOSE 3000 CMD [ "npm","run","start:dev" ] docker-compose.yaml version: '2.24.3' services: server: container_name: server build: context: ./nest dockerfile: Dockerfile ports: - "3000:3000" volumes: - ./nest/src:/src/nest/src can anyone help me on this ?
@Максим-в3ф6о
@Максим-в3ф6о 8 ай бұрын
i got the same problem. Did you find the solution?
@kumaramresh7905
@kumaramresh7905 8 ай бұрын
​@@Максим-в3ф6о no !! What's the solution??
@gregoiremaria1078
@gregoiremaria1078 7 ай бұрын
FROM node:alpine WORKDIR /src/nest COPY package*.json . RUN npm install -g @nestjs/cli RUN npm install RUN npm run build // ==> missing COPY . . EXPOSE 3000 CMD [ "npm","run","start:dev" ]
@Salaralali
@Salaralali 4 ай бұрын
just add src to your start:prod script in package.json, like this: "start:prod": "node dist/src/main"
NestJS Guards
28:35
Anson the Developer
Рет қаралды 5 М.
Nest.js Microservices with NATS, SQL, and Docker
2:20:27
Anson the Developer
Рет қаралды 14 М.
SIZE DOESN’T MATTER @benjaminjiujitsu
00:46
Natan por Aí
Рет қаралды 5 МЛН
Why no RONALDO?! 🤔⚽️
00:28
Celine Dept
Рет қаралды 91 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 12 МЛН
The intro to Docker I wish I had when I started
18:27
typecraft
Рет қаралды 267 М.
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 100 М.
Dockerize Next.js & Deploy to VPS (EASY!)
19:43
ByteGrad
Рет қаралды 69 М.
Is Asp.NET Core Better than Node.js
13:35
Gavin Lon
Рет қаралды 9 М.
NestJS, MySQL, TypeORM Crash Course
1:17:38
Anson the Developer
Рет қаралды 102 М.
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 437 М.
you need to learn Kubernetes RIGHT NOW!!
29:34
NetworkChuck
Рет қаралды 1,2 МЛН
React State Management with Zustand & TypeScript
1:04:35
Anson the Developer
Рет қаралды 4,6 М.
React Query Tutorial (TanStack Query)
56:56
Anson the Developer
Рет қаралды 3,3 М.
Do NOT Learn Kubernetes Without Knowing These Concepts...
13:01
Travis Media
Рет қаралды 326 М.
SIZE DOESN’T MATTER @benjaminjiujitsu
00:46
Natan por Aí
Рет қаралды 5 МЛН