Deploy NodeJS Apps with Docker [2022]

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ม.ค. 2022
  • Want to learn how to pop your NODE JS app into a docker container? Look no further!
    Github: github.com/joeythelantern/Typ...
    Video Info
    Music by Tesko / prod. THXMOS:
    / @prod.thxmos6970
    Support
    Like this video? You can show your support by buying me a coffee ☕❤️: www.buymeacoffee.com/nerdycanuck
    Socials
    Github: github.com/joeythelantern
    Twitter: / thenerdycanuck
    About The Channel
    The knowledge that I share here is mostly from my personal experiences. I wouldn't say I'm a 20 year professional, rather I am just a DevOps / Software Engineer with a lot of experience who enjoys teaching what I know in my spare time. I believe that sharing some of my basic knowledge on this platform can help others get started. There are many ways to program something and the videos you see here are my take on the NodeJS / Typescript / and sometimes Unity world. If this channel helps you learn, or helps you think differently then my job is done 😊.
    #nodejs #docker #typescript
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @mits9991
    @mits9991 2 ปีที่แล้ว +5

    Really plain and simple tutorial 🙏🏽 thank you I’m gonna deploy my nuxt3 project tomorrow at the office. As our front Enders want a fast CDI lane. Instead of 20 years old php legacy deployment. 🤞🏽 ill succeed and make it work in a few hours. I’m gonna search for your react docker video now 🤓

  • @RottynDawg
    @RottynDawg 2 ปีที่แล้ว +6

    Best video I found on this topic by a long shot, thank you!

    • @TheNerdyCanuck
      @TheNerdyCanuck  2 ปีที่แล้ว

      Thanks! What else do you wanna see?

  • @electricimpulsetoprogramming
    @electricimpulsetoprogramming ปีที่แล้ว

    your speaking skills are very great, I'd watch you talk about anything lol

  • @user-sf2ym1ht2g
    @user-sf2ym1ht2g ปีที่แล้ว +1

    Cool. Thank you. Keep on.

  • @Billcomesback
    @Billcomesback ปีที่แล้ว

    When you refer to Version in min 8:05, you mean NodeJs Version or Docker version?

  • @nested9301
    @nested9301 ปีที่แล้ว

    so where is the deployment part?

  • @martinmendez695
    @martinmendez695 ปีที่แล้ว

    Is it better to bundle before building a docker image? The node_modules directory is huge.
    What would be the best way to bundle the nodejs project... I tried webpack, but it is not really good for backend apps, and it does not work with dynamic dependencies (for instance, Sequelize).

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

      perhaps you need to use different layers for node_modules and for app itself. in case of 0 changes in package(-lock).json files it will skip that step

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

      @@mybackupvideos1103 I was doing a webapp to be a SAAS, so every client had the same app running on different port on the server. So, the same image was ran using the same node_modules directory with it was a volume mapped to each container. It worked, and I did not find performance issues.

  • @user-sf2ym1ht2g
    @user-sf2ym1ht2g ปีที่แล้ว

    Can you show how to build the environment for Laravel-nodejs-pusher-echo-websocket project?

    • @TheNerdyCanuck
      @TheNerdyCanuck  ปีที่แล้ว

      Is that something you would be interested in?

    • @user-sf2ym1ht2g
      @user-sf2ym1ht2g ปีที่แล้ว

      @@TheNerdyCanuck I have already found the solution

  • @tudor14
    @tudor14 ปีที่แล้ว +1

    Title may come off as misleading, especially someone new to Docker might think you're 'deploying' a NodeJS app to a service like Google Cloud Run or AWS but really building the image and running the docker container

    • @TheNerdyCanuck
      @TheNerdyCanuck  ปีที่แล้ว

      Hmm, I could change the title

    • @tudor14
      @tudor14 ปีที่แล้ว

      @@TheNerdyCanuck could do, make it reflect you're just running it locally

  • @geosystems2106
    @geosystems2106 ปีที่แล้ว +1

    "Since I have typescript, I have my build command in package.json" -> good for you :) Mine says "missing script build" and a bit lost what exactly it should be :/

    • @mrmartinwatson1
      @mrmartinwatson1 ปีที่แล้ว

      you might not need a build script since typescript build compiles to javascript anyways. you can just use node on the path to the file you want to run. The tsc command is just going to run whatever he had configured in his typscript settings. so instead of `npm run build`, you don't have to do anything, and following this guide, the file you run is what goes after that cmd ['node', 'myfile.js']. If you are using something that requires a build script like react or typescript then you should first consult a seperate guide on compiling then remove anything that launches the application before returning back here.

  • @jc3209
    @jc3209 ปีที่แล้ว +1

    How do you handle environmental variables?

    • @TheNerdyCanuck
      @TheNerdyCanuck  ปีที่แล้ว

      There is a docker keyword called ENV I believe

  • @fabrzy3784
    @fabrzy3784 ปีที่แล้ว

    this doesnt really show how to deploy the container tho, but good job

    • @TheNerdyCanuck
      @TheNerdyCanuck  ปีที่แล้ว

      That is out of scope for this video as there are 1000 places to do so :)

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

    lol you didn't explain how to deploy

  • @amishkrishna9718
    @amishkrishna9718 11 หลายเดือนก่อน +1

    but your title is deploy node js app where is deployment where is nginx and all the commands that use in deployment this is clickbate