4:06 There is one mistake here, bro. The Dockerfile and the context are completely different. The context is not for defining the path to where the Dockerfile is located. Instead, it specifies that the inside the Dockerfile, the starting point for the actual path of operations. If your Dockerfile and the actual context are in different locations, you need to provide the paths separately. For example, if the Dockerfile is named dhaval.Dockerfile and is inside the demo folder relative to the current directory, you can specify the paths like this: ``` build: dockerfile: demo/dhaval.Dockerfile context: ../my_folder/ ```
@MonisYousufАй бұрын
It's NOT a mistake :) Dockerfile and context are indeed different and that's precisely what I say in the video. When you specify the context - compose expects the specified dockerfile at the root of the context. Dockerfile can simply be a file or a subpath to file which is to be found in the context. (See reference code) Sure, you can specify the dockerfiles outside of the context (as you have done in your code sample `../my_folder`), but "CAN" does not mean you "SHOULD". In multi-app compose situations, its not considered a good practice to have dockerfiles outside of the context. And that's the reason that compose expects dockerfile in the context by default UNLESS explicitly specified otherwise. To encourage good conventions, I do not endorse this in the video.
@DhavalAhir10Ай бұрын
@MonisYousuf ok got it.. Keep it up.. 👏
@webprog_oussa2754Ай бұрын
Amazing work, thank you 🙏
@noelparker741Ай бұрын
Absolutely brilliant explanation. I'm no longer confused or intimidated!
@hiteshkanwar2114Ай бұрын
Amazing .. cleared every doubt regarding production environment
@gordonjuliankohn37352 ай бұрын
I'd like to use Github to deploy. Do you have a workflow for this ? I see there is a action for github as well in the repo ?
@JagadeeswarN-ur7of2 ай бұрын
Great explanation..Thanks!!
@nabeehaali6302 ай бұрын
I can't understand why your videos have less views... These are by far the best explanation in a short time period. Thank you so much for your dedication.
@ballackuk132 ай бұрын
keep up good work 🫡
@MithileshSah2 ай бұрын
simple and sweet, thanks
@learning2fall882 ай бұрын
Thank you so much for this video! I understand my course video now! 😊
Thank you Monis. Very cool! A question, though: You said for Production: Avoid docker compose. But how do you specify the networking between containers in production and how do you wire up (depends on:) your containers. It would have been nice if you could explain how to go about deploying your previous application (with a frontend, backend and db) in production. Some advice would be appreciated! Thx.
@MonisYousuf3 ай бұрын
Good Question. There are different ways to do this on production, but I'll explain you the general concept. 1. Imagine you have a frontend app. It's docker image would be pushed to its own docker registry and deployed to its own server. This server will have a DNS or an IP exactly just like you have for the backend app we saw in this video. Let's call it IP_FRONTEND. 2. For your backend app, the image is pushed to its own docker registry and deployed to its own server. This server will have a DNS or an IP. Let's call it IP_BACKEND. 3. Your Database will probably be non-dockerized. Cloud Providers have their own solutions. Nevertheless, it will also have an IP. Let's call it IP_DATABASE. Now, if you're using a cloud provider like AWS, it gives you a default VPC (Virtual Private Cloud) to control networking. For example, we can define that we want to make our IP_FRONTEND public so that it can receive requests from any IP on port 80. We can restrict the backend server (IP_BACKEND) so that its not accessible to the public and can only receive requests from the IP_FRONTEND. So, whenever some backend action is required, it first reaches your frontend and then it contacts the backend (via REST APIs and such). Similarly, you can do the same for your database. Configure IP_DATABASE, such that it can only receive requests from IP_BACKEND. This can be easily achieved via "Security Groups" in AWS. This ensures both, networking & security. This is the general concept. However, in more complex architectures there might be API Gateways and Load Balancers involved as well. For example, If you have multiple replicas of your backend server - you will have a load balancer. Then, instead of exposing the individual IPs of your multiple backend servers, you would expose the IP of your load balancer to the frontend and then the Load Balancer decides which replica to send the request to. If we make it more complex, you may have multiple backend microservices which talk to each other behind the scenes. It might be possible that each microservice has multiple replicas, meaning each microservice also has a load balancer. Then you have multiple load balancers and the requests are delegated by an API Gateway. Similarly more and more complexity can be added, and so the level of complexity for solutions can increase. Hope that answers your question :)
@MohibYousuf-t9o3 ай бұрын
really good... each and every detail was covered.
@luminographix3 ай бұрын
you are a life saver, cheers mate!!!
@deepakkumarkhatri3 ай бұрын
This is the content why I pay for the internet.
@JuliBlu3 ай бұрын
Awesome 👏🏻
@mominyousuf64323 ай бұрын
Great video! 🎉
@elmsuf38453 ай бұрын
i love you man
@bhuvaneshraj54053 ай бұрын
best docker compose video ever greatest explanation continue your work sir
@MadhuKinneraDev3 ай бұрын
Awesome video 🔥
@MadhuKinneraDev3 ай бұрын
Loved it . Wow moment (idempotency key)
@MadhuKinneraDev3 ай бұрын
Amazing video .. I spent 2 days with so many errors .. thank you
@martindm60194 ай бұрын
Excellent explanation!!!
@martinsh72964 ай бұрын
I am not sure if this is your explanation style for all your videos; however, this one was one of the best explanation methods, at least for me.
@horvathmilcsi4 ай бұрын
Very clear and focused presentation! Thank you!
@hamzakyamanywa97925 ай бұрын
Just found you channel. It has brilliant stuff, keep going!
@y.h83835 ай бұрын
great explanation !!
@yoitsteve60385 ай бұрын
Well explained, thanks!
@AdamtheADHDev5 ай бұрын
This was incredibly clear and to the point. As an experienced dev trying to make use of docker, I got more insight from this one video than a bunch of others and reading some documentation combined!
@ZahZah5715 ай бұрын
Great video, subscribed!
@rahulkumarsingh8376 ай бұрын
Awesome, I mean it seriously. I don’t just respect people with just having knowledge and expertise, I respect them who present something like you at least in explaining without having visuals you have included in this video.
@theintjengineer6 ай бұрын
Sehr gut erklärt. Vielen Dank.
@JuliBlu6 ай бұрын
Awesome explanation, Monis!
@HamzahAhmad-db5cy6 ай бұрын
Clear, and concise. The animations made the explanation ever clearer. Thank you for the effort
@hassanxelamin7 ай бұрын
would love to know how this works for production vs local environments
@JuliBlu7 ай бұрын
Awesome! Thank you! I hope many people support you by sharing your videos to their networks 🤞🏻 best of luck, Monis