Amazing video! You explained everything in a very understandable and clear way without oversimplyfing it. Love it
@DevOpsDirective4 жыл бұрын
Great to hear -- that is always my goal!
@lionelaustin55233 жыл бұрын
I realize it is kinda randomly asking but do anybody know of a good website to stream newly released tv shows online?
@geraldvictor34673 жыл бұрын
@Lionel Austin I use flixzone. Just search on google for it :)
@salvatoretrey96973 жыл бұрын
@Gerald Victor yup, have been using FlixZone for since march myself :)
@lionelaustin55233 жыл бұрын
@Gerald Victor Thank you, signed up and it seems to work :) I really appreciate it!!
@Dan-codes2 жыл бұрын
I love the pace that you work through things, no filler and everything I need as a devops newb.
@marjie92883 жыл бұрын
This just one video it solves all my problems on MERN. You are a God sent to us. I'm from the Philippines.
@DevOpsDirective3 жыл бұрын
Great to hear! Hello from the USA 👋
@BulletSP10 ай бұрын
thanks man for saving our time, u explained it very crisp and concise and fully comprehensible
@Gwittdog6 ай бұрын
This video is freaking brilliant. High level yet concise. You have my bell icon being rang.
@bulelanibotman2 жыл бұрын
what an informative video, i don't know much about docker but i was able to understand what docker compose does in just a few minutes into the video. you add yourself a subscriber
@shivangitomar55573 жыл бұрын
I finally understood after watching 10 other videos! You are amazing!!
@DevOpsDirective3 жыл бұрын
Happy to hear that!
@mainulislamfaruqi2 жыл бұрын
We have to give a comment for appreciation such an amazing content. So organized, easy to understand.
@DevOpsDirective2 жыл бұрын
I appreciate that!
@Rodrigo-lq2iy3 жыл бұрын
It's amazing, i feel i learnt way more than 6 minutes. Totally subscribing and recommending this channel! Thank you very much!!
@DevOpsDirective3 жыл бұрын
Woo! Thanks, @Rodrigo!
@renzzogomez21342 жыл бұрын
Thanks a lot mate, I was needing this for a project, great job, please keep rocking!!!
@rodrigolustosa90904 жыл бұрын
Damn!! i'm not even a speaker of your language, and still got the whole ideia.Nice vídeo my friend, you earned a new subscriber!! Hope now i'm going to be able to absorb this whole docker thing
@DevOpsDirective4 жыл бұрын
Amazing! Welcome to the team! 👋👋👋 I have a few other Docker videos as well if you want to check those out.
@chiragkhachane97394 жыл бұрын
Hey man this video was just the thing I was looking for. Solved some of my queries to! Thanks for the tutorial.
@DevOpsDirective4 жыл бұрын
Awesome! Are you building something with docker compose?
@chiragkhachane97394 жыл бұрын
@@DevOpsDirective Yeah. I am building my Undergraduate Project with Docker and MERN stack.
@sureshkrishnan834 жыл бұрын
I probably end up watch all your video by end of this weekend . 😀..thanks
@DevOpsDirective4 жыл бұрын
Epic! Depending on which order you watch, you will see the production quality going ⬆️ or ⬇️ and my beard growing or shrinking 🧔
@conandev37103 жыл бұрын
Well-made, high-quality video. Subscribed. Well done!
@DevOpsDirective3 жыл бұрын
Thank you, Conan! Welcome to the team! 🎉
@markay_3 жыл бұрын
this is awesome stuff! was able to build my frontend and backend images and execute them with docker-compose. thx!
@DevOpsDirective3 жыл бұрын
Glad it helped!
@sriraghariharan1307 ай бұрын
Short and knowledge heavy ❤
@KieCodes4 жыл бұрын
Wow, amazing video, and congratulations on 500 subs! 🙏
@DevOpsDirective4 жыл бұрын
Thanks Kie -- trying to keep up with you! 😎
@KieCodes4 жыл бұрын
@@DevOpsDirective Man, you surpass me easily! My upload schedule is a mess right now. :D
@nuwan92662 жыл бұрын
Superb. Everything you explained is pretty clear!
@DevOpsDirective2 жыл бұрын
Thanks, Nuwan!
@linocesar63283 жыл бұрын
thanks for the video, I'm starting to get to know this technology, and I find it super useful, I want to use it with the MERN stack.
@DevOpsDirective3 жыл бұрын
You are welcome! Good luck!
@MJ-ih1yu4 жыл бұрын
Great explanation! Keep teaching👌
@DevOpsDirective4 жыл бұрын
Thanks @MJ! I plan to!
@chiraggarg80123 жыл бұрын
Thanks. This tutorial clarified my mistakes. Amazing Video
@DevOpsDirective3 жыл бұрын
Awesome -- I'm happy it helped! 🎉
@jamessteph90882 жыл бұрын
Wow!! Great content. simple and well explained. Thank you so much.
@chiefterribleteacher86874 жыл бұрын
Concise and super helpful, thanks for sharing!
@DevOpsDirective4 жыл бұрын
Thanks @Chief Terrible Teacher! I'm planning to do a follow up soon where I take the same setup and make some tweaks to make it more suitable for deployment (since this video shows a development configuration) Stay tuned!
@Gacu7003 жыл бұрын
THIS MOVIE ACTUALLLY WORKS! Tahnk you very much, now i get it :D
@DevOpsDirective3 жыл бұрын
You are welcome!
@LeviAckerman-pl9um3 жыл бұрын
Short informative and simple, thank you for sharing. here's a sub
@DevOpsDirective3 жыл бұрын
Thanks, Mehdi! Welcome to the Team! 🎉
@miladjamali62892 жыл бұрын
nice and clear toturial by the way thank you
@TuomoKankaanpaa4 жыл бұрын
Nice video! 👍 Im using docker compose daily to spin up my dev environment that includes e.g. node, postgres, redis and react.
@DevOpsDirective4 жыл бұрын
It's a game changer, isn't it? Up and running with a single command!
@TuomoKankaanpaa4 жыл бұрын
@@DevOpsDirective Yea for sure, fast and easy!
@Uzakoff_uАй бұрын
Finally, understood, thanks a lot!!!!!!!!
@hafizsabihulhassan19053 жыл бұрын
Very simple precise and perfect you are awesome brother
@DevOpsDirective3 жыл бұрын
Thanks @Hafiz! 🎉
@ayoubmanar92052 жыл бұрын
MAN YOU ARE TOO MUCH GOOD
@PeterFullen3 жыл бұрын
Really great concise video
@Gamer83084 жыл бұрын
Really loved the video !! Helped me a lot thanks !
@DevOpsDirective4 жыл бұрын
Amazing -- thanks for watching and for letting me know!
@farzadsole37844 жыл бұрын
Excellent video, however I had to add the following 2 lines under docker-compose file to get things working; Under "react-app:" add > build: ./client Same for "api-server:" add > build: ./server Thanks
@DevOpsDirective4 жыл бұрын
Thanks @Farzad! I build the images separately (before running docker-compose up) which is why I was able to use just the "image" name in the docker compose file!
@harrisonfok8267 Жыл бұрын
Wow this is really helpful!
@consoledoterror9713 жыл бұрын
"Just keep building" Subbed. Thanks
@DevOpsDirective3 жыл бұрын
It's the only way to get better! Welcome to the team!
@pedruchu2593 жыл бұрын
You are a God, thanks so much, you saved my life!
@DevOpsDirective3 жыл бұрын
Glad I could help, @Drukan!
@externemw34 жыл бұрын
Thank you! Awesome! Greetings from Brazil :)
@DevOpsDirective4 жыл бұрын
Thanks @Jeliel! 👋👋
@mohammadsaad44194 жыл бұрын
this is one great video man, keep it up.
@DevOpsDirective4 жыл бұрын
Thanks -- will do!
@kumarv13742 жыл бұрын
After changing the mondb url from localhost to mongo where I can see it in mongodb compass because iam not able see the data stored after changing it to mongo
@darwish-mammo3 жыл бұрын
you're a great guy mate! thanks for the video
@DevOpsDirective3 жыл бұрын
Thanks @Darwish, and you are welcome!
@ssaai2 жыл бұрын
Excellent 👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻
@edu_sdorneles Жыл бұрын
What a great video!!!
@MjCarnaje-jd5ut3 жыл бұрын
THANK YOUU!! very understandable!
@DevOpsDirective3 жыл бұрын
You're welcome!
@Abel_Lopez_4 жыл бұрын
Awesome! Amazing explanation, thank you!
@DevOpsDirective4 жыл бұрын
You are welcome!
@huynhthanhnhan63Ай бұрын
Let me ask, if I do as you do, how can I connect to moongoseDb conpass to check the data? Thank you very much.
@ced48414 жыл бұрын
Good Video, pleasant voice!
@DevOpsDirective4 жыл бұрын
Thanks @Ced!
@SamarthRawat2 жыл бұрын
Thanks for the amazing tutorial. I am learning docker, your video really helped me learn to dockerize the MERN app. But the I am not able to add movie. when i open localhost:5000 i get "Hello world" as result. Please help me understand this
@meshavegas11 ай бұрын
I have a question if instead of using the network I use nginx is a correct practice?
@girlsincode92553 жыл бұрын
simple and clear.great !!!
@DevOpsDirective3 жыл бұрын
Thanks @girls in code! 🥳
@HoaLe-jx3gg3 жыл бұрын
Very useful!
@DevOpsDirective3 жыл бұрын
Glad to hear that, @Hòa!
@thear0a3 жыл бұрын
thanks, short and to the point
@DevOpsDirective3 жыл бұрын
You are welcome, @Alrz! 🎉
@BDominikGT3 жыл бұрын
Perfect!!! Thank you very much.
@DevOpsDirective3 жыл бұрын
👌-- you are welcome @Balog!
@joshuastrozzi737 Жыл бұрын
I'm new to deploying apps. Why do we containerize our react app? I understand the backend and database, also microservices, but why the front end?? How do you even deploy a containerized front end? Wouldn't you want to just deploy the static files? Clarity on this is appreciated! :)
@DevOpsDirective Жыл бұрын
This is a great question! For deployment: You are correct that you would want to deploy the output of your build step (i.e. the static files it produces). There are lots of ways to do this, one of which would be to bundle those files into a container with something like nginx and deploy that way. If you are already deploying your other applications with a container orchestrator, this allows you to deploy and operate everything in the same way. For development: If you containerize it you can include it within your docker-compose setup so that everyone working on it will share a common setup (rather than needing everyone to have the same versions of all the system dependencies (e.g. node, vite, etc...) Hopefully that helps!
@anasanchez6088-d5i3 жыл бұрын
Excellent!!thank!
@DevOpsDirective3 жыл бұрын
You are welcome, Ana!
@ousmanevincentdione93694 жыл бұрын
Very helpful!! You are amazing!! very nice explanation! Thank you so much!! You fix my comprehension in just 6 minutes!! Can you make a tutorial with java ee wildfly postgres and angular please.
@DevOpsDirective4 жыл бұрын
Thank you for the kind words! I have minimal experience w/ Java and Angular, so I'm probably not the best person to make a tutorial like that.
@ousmanevincentdione93694 жыл бұрын
@@DevOpsDirectiveOk. i understand.Thank you so much !!!
@antoniomagalhaes98123 жыл бұрын
Great content, thank you.
@DevOpsDirective3 жыл бұрын
Glad it was helpful, @antonio! 🎉
@jackedelic91884 жыл бұрын
I am confused, so before using docker-compose up, do we need to separately build the images for client and server?
@DevOpsDirective4 жыл бұрын
Hi Jack -- For the Dockerfile shown in the video (github.com/sidpalas/devops-directive/blob/master/2020-08-31-docker-compose/docker-compose.yml), I specified the "image" directly so you have to build it first. (using "docker build -t ") If instead, I used the build option like here (gist.github.com/sidpalas/850a08326f46839057f611c05fa14f59), then docker-compose could automatically build the images before running. Here is the documentation for the build configuration option docs.docker.com/compose/compose-file/#build Does that help?
@jackedelic91884 жыл бұрын
@@DevOpsDirective That absolutely helps :) Thanks for clearing my doubt
@DevOpsDirective4 жыл бұрын
@@jackedelic9188 Great! Thanks for watching the video and being a part of the community. Keep the comments and questions coming!
@DevOpsDirective4 жыл бұрын
@Mr 3xclamtion Good point!
@CryptoKosh3 жыл бұрын
❤️🔥
@hangtran48633 жыл бұрын
When running docker-compose up , I stumbled upon this error "ERROR: pull access denied for react-app-dev, repository does not exist or may require 'docker login': denied: requested access to the resource is denied"
@DevOpsDirective3 жыл бұрын
This error message means you do not have a docker image with that tag locally so it is trying to pull one from DockerHub. This makes me think you probably did not build the image before running docker compose up!
@scoopedcontent3 жыл бұрын
My data is not displayed from database nor am I able to create new movies. It all worked before docker compose though . Can anyone help
@DevOpsDirective3 жыл бұрын
KZbin comments are very cumbersome for technical discussions, but if you want to join the channel discord community someone can probably help! discord.gg/ExrENts5CT
@pavanvere57693 жыл бұрын
How to change ip address with docker-compose instead of hardcoding
@Operaatoors4 жыл бұрын
I would suggest to keep close the database mount, not using named volume but directly storing db data into folder
@DevOpsDirective4 жыл бұрын
Yes, that is a good point. That way if you ever prune all the dangling docker resources the data can still persist! Since this is just a development setup it's not too critical, and if deploying a configuration like this you probably don't want to run the DB in docker at all!
@aram56423 жыл бұрын
What was it that made Docker and the whole idea of containerization possible?
@DevOpsDirective3 жыл бұрын
Linux namespaces (used to confine what a process can see) and cgroups (used to limit the amount of resources a process can use) are the key! Docker came along and make the user experience for using these much nicer! 😀
@Levelord923 жыл бұрын
You had 440 subscribers, now you have almost 9 thousand. Congrats! What if I need to specify username:password for images like Mongo/RabbitMQ?
@DevOpsDirective3 жыл бұрын
Thanks @Levelord! You would likely want to specify them as an environment variable. In this video, I show one method of doing this: kzbin.info/www/bejne/epfXpIWbrs2taLM You can do this in the docker run command or with docker-compose (docs.docker.com/compose/environment-variables/#the-env_file-configuration-option)
@k4nful4 жыл бұрын
What should we care if we want to use this docker compose file in production mode?
@DevOpsDirective4 жыл бұрын
Great question, I actually have been planning a follow up to this video in which I show the steps that I would take before deploying this application. The updated code is already located here: github.com/sidpalas/devops-directive/tree/master/2020-12-21-productionize-mern But I haven't had a chance to film it yet... Feel free to join the channel discord if you have additional questions about the setup! discord.gg/d6geMBSg3M
@SaikumarN19933 жыл бұрын
Do I need to understand coding part for building thia docker compose file
@DevOpsDirective3 жыл бұрын
While you could technically run the app without understanding the code, it will be much more useful to you if you do (because you will then be able to modify and extend it to fit your needs)
@OfoeNelson2 жыл бұрын
Thank you for this video. So how do you scale your containers if you want to scale after using docker compose?
@DevOpsDirective2 жыл бұрын
If by " scale" you mean "run multiple copies of", Docker compose isn't really designed for that. For managing lots of replicas of your application containers you want an orchestrator like docker swarm, hashicorp nomad, or kubernetes. You could also deploy multiple copies of the container yourself but once you go beyond a single machine, you will end up hacking together your own version of an orchestrator 😆
@OfoeNelson2 жыл бұрын
@@DevOpsDirective Ok I asked because I'm thinking of how companies scale their container databases
@Chris-mr8qm3 жыл бұрын
Noob question here, do you have 1 container that contrains all services (réaction, mongo, api) or we have one container per serice?
@DevOpsDirective3 жыл бұрын
Generally you want to keep each container with a single service. There are some hacks you can do to run multiple things in a single container but it makes things harder to reason about, debug, etc...
@Chris-mr8qm3 жыл бұрын
@@DevOpsDirective Thank you for your answer. last one, is docker compose an orchestration then? how does it defer from kubernetes?
@datamike74574 жыл бұрын
Do you have an example of a docker compose for the ml stack?
@DevOpsDirective4 жыл бұрын
I don't have any good examples on hand, but that could make a good future video! One example (which is admittedly a bit contrived...) could be if we took the movie MERN application from the video and wanted to add a "predicted rating" feature with an ML model (using inputs such as the title, the list of actors, the budget for the film, etc...). We would wrap our trained model with a lightweight webserver to enable it to accept requests, execute the model, and respond with the results. Once we had that, we would add this new inferencing API as another service within the docker-compose. This architecture is nice because we can use whatever language/dependencies we want for the ML model (independent of our technology choices for the rest of the app)!
@afshaarahmed21142 жыл бұрын
ERROR: In file './docker-compose.yml', service 'image' must be a mapping not a string
@stsbmu71694 жыл бұрын
Hello! Thank you very much for video! I would like to ask about the best way to work with Windows environment? In that I mean, I have multiple services and front-end applications are already dockerized and working well. But I have one service built on Node, which requires to be running on Windows 2016 server and for that I do all updates each time manually. Could you suggest what wholesome delivery method I can use for these?
@DevOpsDirective4 жыл бұрын
While I haven't worked with them, I know there are windows base docker images (hub.docker.com/_/microsoft-windows-base-os-images). This pull request (github.com/nodejs/docker-node/pull/362) shows someone using those base images to create a windows based Node image, but it looks like it hasn't been approved/merged yet. Maybe it will give some guidance on how to achieve what you are hoping for though!
@stsbmu71694 жыл бұрын
@@DevOpsDirective Thank you very much! I will do more studying on it
@DevOpsDirective4 жыл бұрын
@@stsbmu7169 Report back as you make progress! As I said, I have not worked with Windows based containers, so I'm interested to hear about your experience with them!
@stsbmu71694 жыл бұрын
@@DevOpsDirective I will do!
@DevOpsDirective4 жыл бұрын
@@stsbmu7169 FYI, I recently started a discord server to make discussions like this easier than YT comments. Come join if you want! discord.gg/CHRvYhwvej
@zymasethecatalyst3 жыл бұрын
I want to use my mongodb atlas uri instead of mongo image How can i do so?
@DevOpsDirective3 жыл бұрын
In this video I swap out the local DB for one running in atlas using an environment variable for the connection URI (kzbin.info/www/bejne/epfXpIWbrs2taLM) I hope that helps!
@shekharaakula62333 жыл бұрын
Great video, finally managed to make a monorepo work with docker but I want to know how to enable live reloading with this for development.
@DevOpsDirective3 жыл бұрын
Hey @Shekhar -- I'm glad it helped! I have implemented a few hot reloading docker configurations durin live streams on the channel, but it might be woth creating a dedicated video about how to use volume mounts to allow source code changes to be represented inside the container in real time.
@shekharaakula62333 жыл бұрын
@@DevOpsDirective That's great, I'll also check out your other vids.
@luppo20074 жыл бұрын
nice video sir! i love it, i have one question im getting started with this docker compose thing. how i create an docker image " of all " to upload to my docker hub? i mean i dont want to create an image of my server side, another of my client and pull the mongo one. it is possible to create one only image and pull it all and run?
@DevOpsDirective4 жыл бұрын
Hi @luppo2007 -- while you technically could run them all in a single container by adding a custom startup.sh script (or similar) to start the 3 processes is is generally a bad idea. There are a number of reasons for this, explained here: devops.stackexchange.com/questions/447/why-it-is-recommended-to-run-only-one-process-in-a-container
@PrieyudhaAkaditaS4 жыл бұрын
I have a question. What if i made some changes in express js or react js, do I need to type docker compose up again and the application will immediately change?
@DevOpsDirective4 жыл бұрын
As configured in the video you would have to rebuild the image first. In my recent livestream (kzbin.info/www/bejne/epfXpIWbrs2taLM) I showed how to mount the source code into the container using a volume so that changes can be reflected immediately!
@PrieyudhaAkaditaS4 жыл бұрын
@@DevOpsDirective thankyou, will look forward for it
@MuhammadBilal-cq6tp2 жыл бұрын
Good Content.
@andreigatej67043 жыл бұрын
Thanks for the great video! Just a small question. I assume the directory structure was something like this: ``` / api-server/ react-app/ ... ``` My question is, what happens if the `api-server` has its own repo? Is cloning the repo into an `api-server` directory and keeping it up to date a viable solution? Thanks!
@DevOpsDirective3 жыл бұрын
Great question @andrei! Git actually has a feature called submodules that is designed exactly for this purpose! git-scm.com/book/en/v2/Git-Tools-Submodules You can have a separate repo for each service and the a top level repo that references them!
@andreigatej67043 жыл бұрын
@@DevOpsDirective That's great! I've heard of them in the past and always wondered what they're for. Not it's time to look into it, thanks!
@DevOpsDirective4 жыл бұрын
Another new software KZbinr ItGuyMichal coincidentally released a docker-compose video yesterday as well (kzbin.info/www/bejne/i3Opmnacl7esoac) His is a longer form tutorial (~40 min) where he walks through setting up docker-compose for configuring Postgres, pgAdmin, and Jupyterlab to work together. If you are looking for a more in-depth explanation/walk through, definitely check out his video and channel!
@albertoramos43123 жыл бұрын
If I'm using a .env with mongo db atlas uri what should I do?
@DevOpsDirective3 жыл бұрын
Hi @Alberto! In this video I configure this app to use Atlas for the DB and use a .env file kzbin.info/www/bejne/epfXpIWbrs2taLM Hopefully it helps!
@albertoramos43123 жыл бұрын
@@DevOpsDirective thanks a lot!
@ninow54 жыл бұрын
So basically docker compose creates a container with several images? Or does it still create 3 sepparate containers?
@DevOpsDirective4 жыл бұрын
Good question! It still creates 3 separate containers, it just manages the set up and tear down (+ networking and volumes) with a single command and allows you to specify everything conveniently in one config file!
@angelosnm4 жыл бұрын
@@DevOpsDirective is it possible to merge them somehow in order to have one container containing those 3 containers as sub-containers? I'm asking in this with the purpose to eventually push my app to docker hub so as to pull & pull the container from anywhere
@DevOpsDirective4 жыл бұрын
@@angelosnm You technically could run all three processes in one container but it would be bad practice. If one of the services had issues it would impact the others and be much harder to work with. It is best to keep each container focused on running 1 thing only.
@fkw0k3t4rd54 жыл бұрын
So lets say every part of the project runs in its own directory with different github repos. Where exactly does the docker compose file go if there are multiple root directories? Does it go in the root of the front end or the backend? I feel like not understanding something fundamental here.
@DevOpsDirective4 жыл бұрын
Good question! For the situation you described I would probably put the docker-compose file at the root of the backend repo and then use the git submodules (www.git-scm.com/book/en/v2/Git-Tools-Submodules) feature to make the frontend repo a sub directory within that repo. If there are even more services (each as their own repo) you could even have a separate integration repo which has all the services as submodules. My preference is just to use a single repo for everything ("Mono-repo") which simplifies your specific question, but adds its own complications elsewhere...
@fkw0k3t4rd54 жыл бұрын
@@DevOpsDirective I was thinking of doing a Mono repos setup myself but wouldn't a large code base of a mono repo present more stability, efficiency, and more importantly scalability challenges? The codebase will be large enough to more than likely suffer from one or more of these issues. "Git fundamentally never really looks at less than the whole repo. Even if you limit things a bit (ie check out just a portion, or have the history go back just a bit), git ends up still always caring about the whole thing, and carrying the knowledge around. So git scales really badly if you force it to look at everything as one huge repository. I don't think that part is really fixable, although we can probably improve on it." -Linus Torvalds
@DevOpsDirective4 жыл бұрын
@Andrew -- how big a codebase are you working with? (in either SLOC or team size) The majority of projects will never reach a scale where Git itself becomes the bottleneck. For me, the benefits of being able to more quickly navigate and refactor across the codebase usually outweigh the (slightly) slower sync times or the need to configure CI/CD to be smart about detecting which services have been modified.
@fkw0k3t4rd54 жыл бұрын
@@DevOpsDirective I'm not sure what the SLOC will be because the project is still in the early stages. I'm a few weeks into creating the api using TDD and my endpoint tests alone are almost 5k lines of code. Edit: The tests I have so far are only for about 15 endpoints. I still have at least 30 to go. Hopeful that gives you an idea of the possible app scale.
@DevOpsDirective4 жыл бұрын
@@fkw0k3t4rd5 Yeah, I doubt you would have issues with something of that scale. I would choose whichever structure you are more comfortable with and will enable you to move the fastest during this initial development phase.
@oliver12310334 жыл бұрын
Great explanation, but I have some question: Do I have to use NGINX and/or pm2 with this setup? Or is this production-ready?
@DevOpsDirective4 жыл бұрын
Hi Pych_1004 -- good question. This is a development setup and is not production-ready. To make it production-ready you would need to do a few things: For the React front end you would want to run npm run build (which builds it into a set of static files). These could then be served with something like nginx (you would probably want to add SSL termination w/in nginx as well to support HTTPS). For the Database, at the very least you will need to configure it with a password, and if the application becomes popular one of the first steps to scaling would be to move the DB off of the same machine as the server (and people debate whether it is a good idea to run a DB in a container for production at all... devops.stackexchange.com/questions/1293/what-are-the-reasons-docker-should-not-be-used-for-databases) Perhaps in the future, I'll do a follow-up video showcasing these steps!
@bryanmullen44624 жыл бұрын
@@DevOpsDirective +1 on this, would love to see how to make a set up like this production ready
@DevOpsDirective4 жыл бұрын
@@bryanmullen4462 Awesome -- thanks for the input. I will put it into the backlog of future video ideas!
@bharathram39774 жыл бұрын
I am getting errors like this. Can you help me out? Pulling mongo (mongo:)... Traceback (most recent call last): File "site-packages\docker\credentials\store.py", line 80, in _execute File "subprocess.py", line 395, in check_output File "subprocess.py", line 487, in run subprocess.CalledProcessError: Command '['C:\\Program Files\\Docker\\Docker\ esources\\bin\\docker-credential-desktop.EXE', 'get']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "site-packages\docker\auth.py", line 264, in _resolve_authconfig_credstore File "site-packages\docker\credentials\store.py", line 35, in get File "site-packages\docker\credentials\store.py", line 93, in _execute docker.credentials.errors.StoreError: Credentials store docker-credential-desktop exited with "error getting credentials - err: exec: "docker-credential-wincred.exe": executable file not found in %PATH%, out: ``". During handling of the above exception, another exception occurred: Traceback (most recent call last): File "docker-compose", line 6, in File "compose\cli\main.py", line 72, in main File "compose\cli\main.py", line 128, in perform_command File "compose\cli\main.py", line 1078, in up File "compose\cli\main.py", line 1074, in up File "compose\project.py", line 548, in up File "compose\service.py", line 361, in ensure_image_exists File "compose\service.py", line 1250, in pull File "compose\progress_stream.py", line 102, in get_digest_from_pull File "compose\service.py", line 1215, in _do_pull File "site-packages\docker\api\image.py", line 396, in pull File "site-packages\docker\auth.py", line 48, in get_config_header File "site-packages\docker\auth.py", line 324, in resolve_authconfig File "site-packages\docker\auth.py", line 235, in resolve_authconfig File "site-packages\docker\auth.py", line 281, in _resolve_authconfig_credstore docker.errors.DockerException: Credentials store error: StoreError('Credentials store docker-credential-desktop exited with "error getting credentials - err: exec: "docker-credential-wincred.exe": executable file not found in %PATH%, out: ``".') [16672] Failed to execute script docker-compose
@DevOpsDirective4 жыл бұрын
Hi Bharath -- Lets first confirm if your Docker Desktop install is working properly. What do you get if you test the docker version ("docker --version")? Also, can you run "docker run hello-world" (which will pull and run hub.docker.com/_/hello-world)?
@bharathram39774 жыл бұрын
@@DevOpsDirective Hi there, thanks for response. I figured out the issue. I was running all commands from Git bash in windows instead of Windows command prompt which somehow caused something to go wrong. But then, I ran into another error ( I have also posted it in stack overflow): stackoverflow.com/questions/63903112/mongo-connection-error-mongonetworkerror-failed-to-connect-to-server-localh
@DevOpsDirective4 жыл бұрын
@@bharathram3977 It looks like the Stack Overflow question was removed... did you figure out the issue?
@DevOpsDirective4 жыл бұрын
@@bharathram3977 FYI, I recently started a discord server to make discussions like this easier than YT comments. Come join if you want! discord.gg/CHRvYhwvej
@michellegburgosf4 жыл бұрын
hi Sam! Your video is amazing. Could u pls help me use MEVN application for the same? Are The steps so different than MERN? Thank you
@DevOpsDirective4 жыл бұрын
Hi @Michelle -- It will be quite similar to the code shown in the video, just swapping Vue in for React! You will need to update the "client" implementation with one using Vue. Do you have the application running already without docker-compose?
@michellegburgosf4 жыл бұрын
@@DevOpsDirective Thank you so much :)
@DevOpsDirective4 жыл бұрын
@@michellegburgosf You are welcome -- Let me know if you run into issues getting it up and running!
@DevOpsDirective4 жыл бұрын
@@michellegburgosf How is the MEVN app going? FYI, I recently started a discord server to make discussions like this easier than YT comments. Come join if you want! discord.gg/CHRvYhwvej
@domemvs4 жыл бұрын
Can you elaborate on the stdin_open option?
@DevOpsDirective4 жыл бұрын
Adding stdin_open: true is the equivalent of using the -i flag in a docker run command In this case it is kind of a hack to get around this issue: (github.com/facebook/create-react-app/issues/8688). Essentially there was an update earlier this year to React-Scripts that causes the react development server to exit after startup when run inside a docker container (at which point the container shuts down). Adding stdin_open: true tells docker to keep STDIN open even though its not attached to the process which keeps the container alive. This is similar to if you were to run: $ docker run node:slim (the container will start up and immediately terminate) versus if you run: $ docker run -i node:slim (the container will remain up after startup) I hope that helps!
@domemvs4 жыл бұрын
DevOps Directive Thank you! Awesome explanation!
@GameChanger_SR4 жыл бұрын
Hey man you are amazing , your explanation is clear and simple ,can you make a video on "how to deploy this application on GCP compute engine " thankyou dear
@DevOpsDirective4 жыл бұрын
Thanks @music! -- I have had a few people express interest in follow-ups to this video, so I will definitely make one! (not sure when though)
@kenny84223 жыл бұрын
Great video! I'm learning docker and this was a great resource. Question though: Wouldn't the react-app depend on the api-server the same way the api-server depends on the mongo container?
@DevOpsDirective3 жыл бұрын
Great question! You are correct that in order to successfully load the page with the movie results in your browser, the react app needs the API server to be running. The difference is that those requests happen when you load the page not when you start the app! The react app is perfectly happy to start up independent of the other two services, whereas the API server will crash if it can't authenticate to the DB upon start up! I hope that helps!
@andrewgalloway80123 жыл бұрын
I'm not sure how this stuff ends up working for people. I'm sure I'm doing something wrong, but it's always endless shots in the dark for me when it comes to Docker. I just want to get back to writing code :(
@DevOpsDirective3 жыл бұрын
It is a fairly steep learning curve because of the additional abstraction, but once configured you shouldn't have to touch it much and hopefully will get teams writing code faster!
@md.fazlulkarim88474 жыл бұрын
Awesome
@DevOpsDirective4 жыл бұрын
Thanks @Md. Fazlul Karim!
@Quick_Code Жыл бұрын
super easy
@rangabharath42534 жыл бұрын
awesome
@DevOpsDirective4 жыл бұрын
Thanks @Ranga!
@jerrysofttechy64043 жыл бұрын
great
@ridl274 жыл бұрын
ty.
@DevOpsDirective4 жыл бұрын
yw!
@maxkinli11 ай бұрын
You can’t just run react app in webpack dev server and say this is your react docker container
@andTutin2 жыл бұрын
whats the point any of this
@maxkinli11 ай бұрын
I’m in shock. 50 y.o guy teaching the wrong stuff… this is the real problem. Why this even exist
@andji87092 жыл бұрын
Amazing video! You explained everything in a very understandable and clear way without oversimplyfing it. Love it