Deploy NodeJS Apps with Docker [2022]

Поділитися
Вставка
  • Опубліковано 25 січ 2025

КОМЕНТАРІ • 29

  • @RottynDawg
    @RottynDawg 2 роки тому +6

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

  • @mits9991
    @mits9991 2 роки тому +6

    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 🤓

  • @tudor14
    @tudor14 2 роки тому +3

    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  2 роки тому

      Hmm, I could change the title

    • @tudor14
      @tudor14 2 роки тому

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

  • @Billcomesback
    @Billcomesback Рік тому

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

  • @porselvans6172
    @porselvans6172 2 місяці тому

    Thanks buddy! :)

  • @electricimpulsetoprogramming
    @electricimpulsetoprogramming 2 роки тому

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

  • @geosystems2106
    @geosystems2106 2 роки тому +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 2 роки тому

      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 2 роки тому +1

    How do you handle environmental variables?

    • @TheNerdyCanuck
      @TheNerdyCanuck  2 роки тому

      There is a docker keyword called ENV I believe

  • @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 9 місяців тому

      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 9 місяців тому

      @@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.

  • @АлекандрМарченко-д6г

    Cool. Thank you. Keep on.

  • @АлекандрМарченко-д6г

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

  • @fabrzy3784
    @fabrzy3784 2 роки тому

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

    • @TheNerdyCanuck
      @TheNerdyCanuck  2 роки тому

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

  • @amishkrishna9718
    @amishkrishna9718 Рік тому +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

  • @mybackupvideos1103
    @mybackupvideos1103 9 місяців тому

    lol you didn't explain how to deploy