Next.js 14+ Docker Tutorial - Dev and Prod Environments using Dockerfile and Docker Compose

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 พ.ย. 2024

ความคิดเห็น • 34

  • @en_kratia
    @en_kratia 8 หลายเดือนก่อน +2

    Several seconds of your explanations of volumes is more useful for me than dozens of youtube videos/articles and stack overflow answers, Thank you.

  • @basitbaig
    @basitbaig 7 หลายเดือนก่อน +2

    Thank you, you done it with super simple excellent way, keep doing good work.

  •  9 หลายเดือนก่อน +3

    You're great Umair, thanks for sharing your knowledge

  • @geniusworkspace17
    @geniusworkspace17 4 หลายเดือนก่อน +1

    thank you so much. keep it up. The way you teach this step by step is really amazing. I hope you follow this way in your future videos. Thanks again. 👍👍👍

  • @maddbzfan234
    @maddbzfan234 3 หลายเดือนก่อน +1

    This playlist is really helpful, Thank you so much for providing such valuable content ❤

  • @rayhanislam7518
    @rayhanislam7518 8 หลายเดือนก่อน +4

    How can I use it like changes to reload. I test it. but not working

  • @dknzx4964
    @dknzx4964 7 หลายเดือนก่อน +2

    This was so helpful. Thanks!!

  • @vivekbindrafanclubpro4329
    @vivekbindrafanclubpro4329 4 หลายเดือนก่อน +1

    one of the best video ever seen

  • @kavindusenevirathne
    @kavindusenevirathne 8 หลายเดือนก่อน +1

    Thank you very much Umair!

  • @VoceBR97
    @VoceBR97 7 หลายเดือนก่อน +1

    Omg, thank you so much friend \o/ Another subscriber

  • @averstrum6372
    @averstrum6372 8 หลายเดือนก่อน +1

    Shouldn't the production build be the dist folder only with nginx and as small as 15mb, not the volumeless 2gb dev environment?

  • @jonnyb494
    @jonnyb494 หลายเดือนก่อน

    if I execute the "COPY . ." command at 10.38 before "RUN npm install", wouldn't I lose the benefits of Docker caching?

  • @zoki5388
    @zoki5388 11 หลายเดือนก่อน +3

    Hey mate, you make good videos but you should share link to repo.

  • @priyankpal7844
    @priyankpal7844 8 หลายเดือนก่อน +2

    why image size is too large for production

  • @RutvikChaudhary-g4c
    @RutvikChaudhary-g4c 10 หลายเดือนก่อน +1

    hii! @umair I got this tricky problem do you think you can help me? So basically when i run build with env then all my values get hardcoded and if i run build without env then the process.env.url stays the same but it doesn't read values from .env file even after copying it to standalone output dir of build, i get undeifined. I have a backend code which was running at localhost:8000, so now when i create the nextjs frontend image and nodejs backend image and try to run them on k8s the backend url get changed so because of hardcoded values ,the frontend can't connect to backend now. I can run backend first then get the ip address and build the frontend image accordingly but in future if i make any change to my backend because of which i might get new ip address then again i have to rebuild my frontend image.Then all the cicd, and zero downtime strategy of k8s will be wasted.I tried official and other site but didn't actually helped.Even a short video will be helpful.Thank you.

    • @NitinSharma00001
      @NitinSharma00001 9 หลายเดือนก่อน

      Hi! Did you got any solution to this problem, I'm facing this issue a lot and having a lot of tech debt due to it?

    • @RutvikChaudhary-g4c
      @RutvikChaudhary-g4c 9 หลายเดือนก่อน

      @@NitinSharma00001
      No Bro :(

  • @roshankumar-um9he
    @roshankumar-um9he 10 หลายเดือนก่อน +1

    Can we access NEXT_PUBLIC_ prefix env variable in docker.. because it’s giving me undefined in docker environment

  • @srrain1342
    @srrain1342 8 หลายเดือนก่อน

    How would you use docker compose watch with this?

  • @24pratikbhagwat68
    @24pratikbhagwat68 10 หลายเดือนก่อน

    Hey i have a doubt while using docker suppose we want to change some files and then see the changed code do we need to first copy the project on our local machine or we can change from docker container itself then how could you please explain??

  • @roshankumar-um9he
    @roshankumar-um9he 10 หลายเดือนก่อน

    How will i set client env variable in next js with docker.. it giving me undefined in docker environment

    • @RutvikChaudhary-g4c
      @RutvikChaudhary-g4c 10 หลายเดือนก่อน

      if you are creating production build then name your .env either as .env.production or .env.local it will load env variable at build time but please note that all the values will be hardcoded.

    • @RutvikChaudhary-g4c
      @RutvikChaudhary-g4c 10 หลายเดือนก่อน

      and one more thing if you are running dev then follow the video guide.

  • @mdabuhanif357
    @mdabuhanif357 10 หลายเดือนก่อน

    When I update the code on my local machine, then it's not updated automatically in the browser. I tried docker compose watch, but not working. I use Windows. How can we do it? Thanks

    • @ChrisDville
      @ChrisDville 9 หลายเดือนก่อน +1

      In development you can use a bind mount

  • @АлександрМерный-м1ч
    @АлександрМерный-м1ч 9 หลายเดือนก่อน

    if you are using docker compose and declare a ports like: 3000:300 you are no need to expose port in dockerfile

  • @SubburajK-fe4er
    @SubburajK-fe4er 10 หลายเดือนก่อน

    i am waiting for CI/CD :)

    • @ProgrammingwithUmair321
      @ProgrammingwithUmair321  10 หลายเดือนก่อน +1

      Already published on my channel

    • @SubburajK-fe4er
      @SubburajK-fe4er 10 หลายเดือนก่อน

      @@ProgrammingwithUmair321 I will check it thank you. you are doing great job :)

  • @nahueljj
    @nahueljj 7 หลายเดือนก่อน

    fetching on server side dont work

  • @qwerty-or1yg
    @qwerty-or1yg 3 หลายเดือนก่อน

    No repo link? (- _ - )

  • @АлександрПоткин-у6н
    @АлександрПоткин-у6н 10 หลายเดือนก่อน +1

    [Error: ENOENT: no such file or directory, open '/app/.next/BUILD_ID']