If you want your data to persist in prod, add something like this to your mongo service... volumes: - ./data/db:/data/db .There are many resources online so when you create these files, be sure to check some other examples. This is a very basic setup
Beautiful. You probably just saved me at least a few hours of work. The whole point of a DB is persistence so that line of code helps a ton! Great video.
Thank you so much man!!. 02:25 This really helped me. After searching for 2 days i found this video and just small change and my codes are running now. Replaced localhost with the container service name in my url. Thanks once again!!
I will vouch for Digital Ocean. I've used many providers over the years Go Daddy, Name cheap, Media Temple, etc... After I went to Digital Ocean I will never go back. I've been with them for many years and have watched them go through so many large changes but I've loved everyone of them. They offer so many more features now than they did when I first signed on, it's amazing. The pricing tiers are great, the pricing model is great, and in minutes I can add a free external firewall, a $5 CDN, inexpensive daily live full-image backups and manual full-image snapshots, domain hosting, Lets Encrypt auto-generation and a raw server just handed to you with no limits or restrictions. Who wouldn't want to use them lol.
Great tutorial, thank you. It's worth pointing out you should always use a passphrase to protect your ssh private keys unless you really don't care about the hosts you put the public key on, which is probably the case for this demo, but viewers might not realise that.
That was perfect. Made understanding how Docker makes it so easy to set up and run in several environments very easy to understand. Thanks again sir. As always clear and concise and to the point. Even the real world issue with SSH key was easy to understand and didn't take away from the purpose at all. Appreciate you!
I'm an infrastructure guy trying to dip his toe in to the microservices realm and part 1 & 2 of these videos lays it all out there in a way that makes sense. Good work, I'll be checking out some of your other videos as well!!!
Excellent tutorial. I've been a developer for 20 years but I'm a complete beginner with Docker. I've been watching some of your other videos and you have a treasure trove of info on many topics. Glad I found your channel!
If you are new to docker you should run the 'docker system prune' command. If not you may eventually have a bunch of images taking up gigs of space on your drive
Again, - Brad to the Rescue. Just started working with Docker-Compose and besides it not doing what I wanted- it kept installing packages with yarn :X glad this video was around to save my day... again.
This was awesome man. Followed it step by step, learned how to launch in D.O, learned how to generate ssh keys and even switch between ssh-agents because i didn't want to overwrite my previous key. Thanks for all you do!
Dude, I watched the part one of this and it's awesome. You definitely got me hyped about this DevOps thing... a great tutorial and great teacher. Bravo!
Great video! I appreciate how genuine you come off as especially with the random phone "dings" and the random "Siht" bombs. It makes your videos easier to follow cause its' not a totally monotone script.
For those that are having problems when accessing the localhost with $ docker-compose up you should do this in the docker-compose.yml REMOVE: links: - mongo AND REPLACE IT FOR: external_links: - mongo This worked for me, credits to: Doc1337 (he answered an issue in GitHub)
Hey Brad, thanks for the videos, you're awesome! Quick tip from one mac user to another you may not be aware of. On mac you can pipe a command to pbcopy in order to copy it to your system clipboard. So you can do "cat ~/.ssh/id_rsa_do.pub | pbcopy".
Awesome video! Very casual, down to earth which I can totally connect because I share the same minor frustrations and occasional swearing. Way better than listening to someone reading a script or straight from wikipedia.
12:00 Links have been replaced by networks. Docker describes them as a legacy feature that you should avoid using. You can safely remove the link and the two containers will be able to refer to each other by their service name (or container_name). With compose, links do have a side effect of creating an implied dependency. You should replace this with a more explicit depends_on section so that the app doesn't attempt to run without or before redis starts. Source: stackoverflow.com/a/41294598/9226919
Super informative tutorial, as always! I was already was familiar with Docker when I started it, but the recap and detailed explanation of what you are doing and how everything works is always that extra +5% that gives one the confidence to deploy in production :) p.s. the best part of this tutorial was the "shit" in a Boston accent. As a New England ex-pat, that's a sound I've not heard in a long time! 😂👏
If someone is getting "connection refused" connecting to their express server. In your dockerfile, you don't want to "RUN npm start". This is for running commands. Its better to define runtime with "CMD ["npm", "start"]"
for who getting docker-compose error you need to install docker-compose 1-Copy the appropriate docker-compose binary from GitHub: $ sudo curl -L github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose 2-Fix permissions after download: $ sudo chmod +x /usr/local/bin/docker-compose 3-Verify success: $ docker-compose version now you can use docker-compose up
Only 2 videos of Docker and finally I get how Docker works and how to properly work with it... you could make a video on how to make a container workspace so you don't need to install npm, php, composer and all those in your local machine.
I am curious about the LAMP stack in Docker. I think it would be pretty relatable to a Flask stack with NGINX. That was my interest after this video. With NGINX you usually set up the configuration to point to the working directory of the Python virtual environment, set the domain name, ect. If NGINX is in a separate container from your Python app/service, how does it point to the Python app working directory?
Question: Do I have to build image and docker-compose every time files are modified when developing the project? I have no experience of development using Docker.
I used Now for Docker deploy but in version 2 they eliminated support... Which other option you recommend to test for free? Thanks! All your tutorials are awesome, right to the chase without blah blah
If you want your data to persist in prod, add something like this to your mongo service...
volumes:
- ./data/db:/data/db
.There are many resources online so when you create these files, be sure to check some other examples. This is a very basic setup
Beautiful. You probably just saved me at least a few hours of work. The whole point of a DB is persistence so that line of code helps a ton! Great video.
What about the Security of the Mongo Container? Anyway to manage it with docker as well?
Just to be clear on this. If I run "docker-compose down", the database will be cleared if it has no external volume right?
@@andressoop Yes exactly.
@@andressoop Yeah
your tutorials are always perfect.
Audio: 10/10
Video: 10/10
Information: 10/10
plus we got a quick ssh and GitHub Key tutorial hahahha ** insert "I came looking for copper and I found gold" meme **
Password frustration comedy: 10/10
I’m glad you didn’t edit out your fumbling with the SSH keys and passwords, it was the most relatable part of the video 😂😭
Thank you so much man!!. 02:25 This really helped me. After searching for 2 days i found this video and just small change and my codes are running now. Replaced localhost with the container service name in my url. Thanks once again!!
I will vouch for Digital Ocean. I've used many providers over the years Go Daddy, Name cheap, Media Temple, etc... After I went to Digital Ocean I will never go back. I've been with them for many years and have watched them go through so many large changes but I've loved everyone of them. They offer so many more features now than they did when I first signed on, it's amazing. The pricing tiers are great, the pricing model is great, and in minutes I can add a free external firewall, a $5 CDN, inexpensive daily live full-image backups and manual full-image snapshots, domain hosting, Lets Encrypt auto-generation and a raw server just handed to you with no limits or restrictions. Who wouldn't want to use them lol.
This is really great! Hoping for a series on Kubernetes :D
Great tutorial, thank you. It's worth pointing out you should always use a passphrase to protect your ssh private keys unless you really don't care about the hosts you put the public key on, which is probably the case for this demo, but viewers might not realise that.
That was perfect. Made understanding how Docker makes it so easy to set up and run in several environments very easy to understand. Thanks again sir. As always clear and concise and to the point. Even the real world issue with SSH key was easy to understand and didn't take away from the purpose at all. Appreciate you!
I'm an infrastructure guy trying to dip his toe in to the microservices realm and part 1 & 2 of these videos lays it all out there in a way that makes sense. Good work, I'll be checking out some of your other videos as well!!!
Excellent tutorial. I've been a developer for 20 years but I'm a complete beginner with Docker. I've been watching some of your other videos and you have a treasure trove of info on many topics. Glad I found your channel!
Great tutorial. I appreciate the "hiccups", more realistic then many tuts out there. It give a sense of how things can be. Thanks!
I can't believe all this material is FREE.
Thank a lot for the material.
If you are new to docker you should run the 'docker system prune' command. If not you may eventually have a bunch of images taking up gigs of space on your drive
Again, - Brad to the Rescue. Just started working with Docker-Compose and besides it not doing what I wanted- it kept installing packages with yarn :X glad this video was around to save my day... again.
This was awesome man. Followed it step by step, learned how to launch in D.O, learned how to generate ssh keys and even switch between ssh-agents because i didn't want to overwrite my previous key. Thanks for all you do!
Genuinely love this walkthrough, but my favorite moments are: whispering "shit" and the 4 attempts to login.
Yeah, it's the real situation people are experiencing.
Dude, I watched the part one of this and it's awesome. You definitely got me hyped about this DevOps thing... a great tutorial and great teacher. Bravo!
Man, you don't need to apologize!!!!! Even with this "mistake" turn to a recap of ssh!!! Appreciate it!!!!
Docker is godsent, makes everything so much simpler
Great video! I appreciate how genuine you come off as especially with the random phone "dings" and the random "Siht" bombs. It makes your videos easier to follow cause its' not a totally monotone script.
For those that are having problems when accessing the localhost with $ docker-compose up you should do this
in the docker-compose.yml
REMOVE:
links:
- mongo
AND REPLACE IT FOR:
external_links:
- mongo
This worked for me, credits to: Doc1337 (he answered an issue in GitHub)
can i make image of both containers into one
The SSH Key hiccup was a good thing as it refreshed my memory about it!
Please keep doing tutorial please. It’s rare to see tutorials of such high quality! Thank you!
Hey Brad, thanks for the videos, you're awesome! Quick tip from one mac user to another you may not be aware of. On mac you can pipe a command to pbcopy in order to copy it to your system clipboard. So you can do "cat ~/.ssh/id_rsa_do.pub | pbcopy".
Brilliant video. Just getting started with all of this. I found it easy to follow along. You kept the jargon simple. I appreciate it
These two videos about Docker are gold...
Thanks a lot!!
love you bro
just love the way you teach things in simple yet effective manner
have been following you for some time and I am already your fan
Absolutely Awesome Content . Thank you very much . As I am a new beginner on Docker and Container , I feel very confident now .
Nice and simple, straightforward example. Exactly what I was looking for. Thanks!
Brad ... shout out from South Africa. This was awesome... Such good content. Docker seems a bit more simple for me now.
Thank you for great Docker tutorials. Could you make some tutorials about Kubernetes, which basically uses Docker containers for servers.
Awesome video! Very casual, down to earth which I can totally connect because I share the same minor frustrations and occasional swearing. Way better than listening to someone reading a script or straight from wikipedia.
12:00 Links have been replaced by networks. Docker describes them as a legacy feature that you should avoid using. You can safely remove the link and the two containers will be able to refer to each other by their service name (or container_name).
With compose, links do have a side effect of creating an implied dependency. You should replace this with a more explicit depends_on section so that the app doesn't attempt to run without or before redis starts.
Source: stackoverflow.com/a/41294598/9226919
Thanks Brad this is awesome free course
That ssh part helped me :) too. Thanks.
Thanks for talking through the SSH issue.
Thanks for another nice 2in1 tutorial. I didn't realized that it is possible to work with ssh so efficient in shell :)
docker is insane! and this tutorial also was insane. thanks brad!
Hi Brad, please add some videos about debugging on vscode and if possible some testing toturials
A Headless Wordpress video would be my next choice. Thanks for all you do.
Can you do a tutorial on > How to make unit tests for code coverage of a whole express project: including routes, controllers, models, etc.
Re-watching it in 2x speed..it was the same reactions that i give when i forget my password for github..hilarious..!! Great video brad..!!
Excellent tutorial. Thank you for sharing this. It really helps a lot because your instructions are very clear and practical. More power to you.
It definitely deserves a massive like
Thank you Brad
Thanks a bunch! Great tutorial, and nice that you left the ssh key part etc. in the final edit, makes me feel normal :D
Awesome tutorial as usual. Thanks Brad!
Wow, this is amazing! Thank You Brad
thank you sir for explaining the docker.
Super informative tutorial, as always! I was already was familiar with Docker when I started it, but the recap and detailed explanation of what you are doing and how everything works is always that extra +5% that gives one the confidence to deploy in production :)
p.s. the best part of this tutorial was the "shit" in a Boston accent. As a New England ex-pat, that's a sound I've not heard in a long time! 😂👏
If someone is getting "connection refused" connecting to their express server. In your dockerfile, you don't want to "RUN npm start". This is for running commands. Its better to define runtime with "CMD ["npm", "start"]"
Thanks, fantastic intro to Docker!
Thanks fir great vdo, really waiting for Kubernetes series
for who getting docker-compose error
you need to install docker-compose
1-Copy the appropriate docker-compose binary from GitHub:
$ sudo curl -L github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
2-Fix permissions after download:
$ sudo chmod +x /usr/local/bin/docker-compose
3-Verify success:
$ docker-compose version
now you can use docker-compose up
Great video for beginners. Please do more on docker!
Just what I needed. Very well explained. very good video. Thanks !!
This is actually very good! Thanks!
Excellent tutorial for beginners.
Thank you, sir! I learned a lot following your codes, comment as well as all the explanation.
This was incredibly helpful. Thank you Brad
You are amazing Brad!
Awesome tutorial. Simple and to the point!
Wait 2 videos at the same time , I am on cloud 9 , thanks Brad.
Is there any technology you don't know! Excellent tutorials. keep up the good work.
I'm simple guy, when I see Brad's video, press thumb up button
Doing the ssh configuration is also showing the process, nice 🙂
Great learning,Thanks for sharing Brad.
perfect lesson, thank you for your efforts
omg thanks for taking the time to do this
Thx a lot for your tutorial! It helped me a lot with my college assignment :)
Another great video. Man you are the best. Please add more docker networks and security related videos
Only 2 videos of Docker and finally I get how Docker works and how to properly work with it... you could make a video on how to make a container workspace so you don't need to install npm, php, composer and all those in your local machine.
Information very important in 2:39 to solve problems to connect Nodejs and MongoDB.
Always amazing content Brad, I'm so glad to be one of your subscribers. Thank you very much
Is there a way to display a maintenance page if the containers are not working?
I am curious about the LAMP stack in Docker. I think it would be pretty relatable to a Flask stack with NGINX.
That was my interest after this video. With NGINX you usually set up the configuration to point to the working directory of the Python virtual environment, set the domain name, ect.
If NGINX is in a separate container from your Python app/service, how does it point to the Python app working directory?
how do you get this to automatically sync with github? or do we need to manual git pull and do another docker-compose up every time?
Hey! An elasticsearch video would be great!
Would love to see some more docker stuff. A tutorial with react/express/mongo + docker would be awesome. Maybe even some Kubernetes at some point!
we should install new nodejs module insede container or host machine ?
Awesome video. I'd love to see some more docker videos!
I need help, when I hit localhost after docker-compose up it just keeps loading the page
If you make changes you should use docker-compose build to see your changes
you are a life saver. thanks alot man. really helped me alot
Hi Brads, Awesome awesome tutorial for jump into Docker! thank you for your effort, really appreciate you contribution to the success of my career!
I specifically like the parts you speak out some F* world. Because I think it's the reallity when I coding and also very fun.
The funniest part of this is Brad forgetting his git password. It's funny because it's relatable
Question:
Do I have to build image and docker-compose every time files are modified when developing the project?
I have no experience of development using Docker.
Within a single server can I have several separate containers?
So glad you messed up with the SSH it definitely helped!! :D
Can we use heroku than digital ocean?
Very helpful, Brad. Great job!
I don't understand why use Copy for package.json as it seems to be already at working directory. Thanks for reply
you are amazing dude i have learned so much from you be happy for what you do for world bro
You made it look very simple, thx.
Excelent as always Mr. Brad !!
Great, thanks! Suggestion: You could make a tutorial with the MERN stack, e. g. with your Devconnector app.
Hello Sir
your lectures are awesome! Thank you
I
so a password and user was not set on the MongoDB image? What would be the enviromnents for the docker-compose.yml file to add this?
Brad, is it possible to expose a port in a Dockerfile based on an environment variable (ie process.env.PORT) - thanks
I used Now for Docker deploy but in version 2 they eliminated support... Which other option you recommend to test for free? Thanks! All your tutorials are awesome, right to the chase without blah blah
If I use Docker, do I need to create env variables for dev and production?