VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » freeCodeCamp.org
Learn Docker - DevOps with Node.js & Express

Learn Docker - DevOps with Node.js & Express

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Learn the core fundamentals of Docker by building a Node/Express app with a Mongo & Redis database. We'll start off by keeping things simple with a single container, and gradually add more complexity to our app by integrating a Mongo container, and then finally adding in a redis database for authentication. We'll learn how to do things manually with the cli, then move on to docker compose. We'll focus on the challenges of moving from a development environment to a production environment. We'll deploy and Ubuntu VM as our production server, and utilize a container orchestrator like docker swarm to handle rolling updates. -- Course developed by Sanjeev Thiyagarajan. https://www.youtube.com/channel/UC2sYgV-NV6S5_-pqLGChoNQ
Date: 2022-03-14

Comments and reviews: 10


Getting this after running docker-compose up
[nodemon] 2.0.15-
node-app-container_1 - [nodemon] to restart at any time, enter -rs--
node-app-container_1 - [nodemon] watching path(s): -.--
node-app-container_1 - [nodemon] watching extensions: js,mjs,json-
node-app-container_1 - [nodemon] starting -node index.js--
node-app-container_1 - listening on port 4000
This might be right, but it still shows as broken on my browser. To display on my browser, I still have to run node index.js or nodemon index.js
Any ideas as to what I'm missing?

reply

Hi Sanjeev, just going through the video and already know this is great content. I have an issue that need to ask you. When I haven't go a node_modules folder on my local machine and run the container in read-only mode, i.e., -v $-pwd-:/app:ro, I get this error: docker: Error response from daemon: OCI runtime created failed:... But when I have a node_modules folder in my local machine, it will work. Just wondering if you can provide some explanation around this. Thanks in advance!
reply

Okay so my /etc/nginx/conf.d directory is empty and I have to manually create default.conf file. And whenever I stop the containers and start them again, nginx doesn't work saying that default.conf file cannot be modified as it is read only. Then I have to delete the file and create it again to make it work.
Does anybody else facing this issue? Should I remove the read only flag?

reply

If you have Windows 10 Home, don't bother installing docker. You need Windows 10 Pro version to run it.
Solution 1: Reset your computer and install windows 10, and then activate a pro key. Most of the time Windows doesn't allow upgrading from Home to Pro.
Solution 2: Create a VM and continue your work from there.

reply

please help, after installing mongoose , i have started getting error with docker-compose up --build
The command '/bin/sh -c if [ -$NODE_ENV- = -development- ]; then npm install; else npm install --only=production; fi' returned a non-zero code: 1-
ERROR: Service 'node-app' failed to build : Build failed

reply

At 1:38 the if statement is unnecessary if you change the line before it to: COPY package-.json and then change RUN npm install to RUN npm ci, as long as the NODE_ENV is set to production it won-t install dev dependencies, otherwise it will. Note: you must not have package-lock.json in you dockerignore file
reply

Anybody else getting the following error when doing -docker build .-?
-failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = failed to fetch oauth token: unexpected status: 401 Unauthorized-

reply

Hey there! Great work as always!!
Is it possible to docker-compose and select and already populated with data Cloud Atlas host?
I mean most things online use new local mongodb or new Atlas db but could it still work with an already made Atlas db?

reply

This is a heck of a good tutorial. Shame Docker can't tell between anonymous volumes and named, and --volume erases all. Are you sure docker-composer up is different from docker compose up? I can't see any difference -on my machine- :)
reply

Am I missing something where I still have to cancel nodemon or the -node index.js- run before I can type anything again? Seems like it defeats the purpose of nodemon. Doesn't seem like Sanjeev has to cancel runs
reply
Add a review, comment






Other channel videos