Deploy NodeJS Apps with Docker [2022]

Поделиться
HTML-код
  • Опубликовано: 16 ноя 2024

Комментарии • 28

  • @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!

  • @tudor14
    @tudor14 2 года назад +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  2 года назад

      Hmm, I could change the title

    • @tudor14
      @tudor14 2 года назад

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

  • @electricimpulsetoprogramming
    @electricimpulsetoprogramming 2 года назад

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

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

    Cool. Thank you. Keep on.

  • @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 Год назад

      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.

  • @Billcomesback
    @Billcomesback Год назад

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

  • @jc3209
    @jc3209 2 года назад +1

    How do you handle environmental variables?

    • @TheNerdyCanuck
      @TheNerdyCanuck  2 года назад

      There is a docker keyword called ENV I believe

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

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

  • @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 7 месяцев назад

      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 7 месяцев назад

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

  • @nested9301
    @nested9301 Год назад

    so where is the deployment part?

  • @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 7 месяцев назад

    lol you didn't explain how to deploy