Spring Boot Microservices Project Example - Part 9 | Dockerize the application
Vložit
- čas přidán 17. 09. 2022
- Spring Boot Microservices Project Example - Part 9 | Dockerize the application
This video will teach how to dockerize our application and orchestrate the containers using Docker Compose.
Source Code
github.com/SaiUpadhyayula/spr...
⭐️⭐️ You can follow me on Social Media through the below Links⭐️⭐️
Twitter: / sai90_u
Blog: programmingtechie.com/
Dev.to: dev.to/saiupadhyayula
Facebook Page: / programmingtechie
Without a doubt the best microservices course in whole internet. Every minute I learned a lot . Keep going .very deep and nice content👌
No doubt the best content.
indeed💌
"Docker for java" would be awesome addition Mr ...
Thank you so much 🙏🏻
Thank you! this tutorial series is great! I would highly appreciate a "Docker for Java" series!
Great work.
Much appreciated😊
A docker tutorial for java developers will be great.
the Best of best. Clear, practical, and concise.
today I completed till part 8 and disappointed that I'll have to wait for weeks for the next video. but this is a great surprise. Thank you sir!!!
Best Tutorial on microservices I have ever seen. You must create Docker series. Will help a lot. Thank you
12:20 . Waow I didn't expect you also covered jib. You are the best bro . Started from docker then explained docker layerd and then jib. Awesome
Best backend tutorial out there!, congrats good man!, you really cleared my mind
Thanks for a quick upload. Your tutorials really teach a lot
Great work, please a detail series on docker for Java will be of great help. Thanks so much for your time and effort
Amazing tutorial. I really appreciate your efforts. Thank you so much
Great tutorial, Thanks for making this video!
Docker in java that is all we need, your content is gem. Thanks for creating such an awesome content. 🙂🙂
Thanks for uploading this video....nice explanation 👍
Fantastic video Sai. This helped me to learn various topics in the Spring world.
😎
Many thanks, this is much value video.
This one is the best tutorial of microservices on CZcams. There is one thing that is now available the SAGA pattern implementation, can you please create a SAGA pattern implementation using Kafka.
Good work!
Great!!! much appreciate🤩
thank you so much for this course💘
Thank you very much for this wonderful tutorial, please go ahead with the docker tutorial too.
agree sir..
This is great man, thanks you so much!
Of course we whant. I am waiting to see your docker tutorial :)
A Big thank you for making this tutorial. Learned a lot.
Need a tutorial on how to deploy these microservices in AWS.
Really good one. Thank you. Would be nice if you make "Docker and Kubernetes tutorial" juxtaposing those and explaining the differences, pros and cons.
Thank you bro ! Get a happy life !!!
Perfect 🙂
Docker tutorial from you, would be great. Love your work
Thanks you.This video very useful to us. Apart from this should share any video about creating how to create docker files in target folder.
Thanks!
Great tutorial 🙏. docker tutorial please.
Best video ever
Yes need every thing about Docker from 0:40
Best backend tutorial till now! Many thanks for the detailed explanation. Also, I would highly appreciate a "Docker for Java" series!
Great video and thank you so much bro @Programming Techie!
One question, please? Where is the video for the k8s related content? It seems the next part of the video is not for k8s...
my god , what's a great man
YOU ARE AMAZING. Just when i needed this. thank you. Plaese make a tutorial in depth about the docker-compose file you used in main project. until then, 1 question: is it possible to create independent docker compose files and dockerfiles for each service?
Yes, it's possible to use multiple docker-compose files.
For our case, you can use one docker-compose file for all external services like DB, Kafka, zookeeper, keycloak, etc.
And another docker-compose file just for our services.
please i would love a docker tutorial for spring boot, thanks
SIr u can also use alpine jdk, jre for reducing even more sizes
Hello , This tutorial is so great .Pls accept my thanks. Where is the tutorials on Kubernetes deployment?
17:59 will use docker compose to run the images pushed to docker hub.
very nice course!
One question still, more related to docker(compose), in the dockercompose file we are not exposing any microservice downstream application (like inventory-service for example) ports. I guess that all is somehow automatically handled by the docker-compose? Otherwise service discovery with running multiple instances of same downstream application would be impossible ?
nice video. where is next video refactored for k8S you mentioned?
Would be great to have a 'Docker for Java' course
First of all, thank you for thi sincredible content. Where did this postgres come from?
Hi thanks bro for this beautiful course, great work.
can you add ELK integration for microservices plz (i guess that you forgot this part) also config server?
Thank you. Can you also make a video on running the services on HTTPS.
0:40 yes sir please docker for java developer and latest ways for spring boot.
Please make a series of docker
Finally ,I have almost reached an end. Can we expect a Spring ,Angular project with Cloud deployment in future? If no ,please suggest some place where I can find such project with explanation skills close to you
I will plan a blog post with the UI and Kubernetes Deployment
Good video can you do another video how to deploy microservices application into AWS EKS
i have a issue! why are we using Postgres configurations instead of using mysql configuration on docker compose?
"Docker for java" Please make this series. Thank you.
Need a Docker video like complete guide.
Sir, Are you going to also cover the fronted part as well? I mean how to connect our micro-services to the front end? Because no one on the CZcams covers it. My humble request is to create front end connection part as well. So, After this course as a student we can build our own full stake projects. And Thanks for teaching such a world class education for free.
As u can see all microservices are exposin one url from api gateway which is lohalhost:8080. All u have to do is fetch data threw this address and u can build frontent.
Plz do make video on docker
Thanks. I hope you have time to make a docker video.
Where do we save the settings.xml file containing someone's user name and pwd? It seems you just mentioned it on the fly?
Hope to create new video for guiding deploy to ḱ8s in this tutorial
please create a video on docker
Why did you choose to expose all services to the host? In my compose project, I opted to create a network and only exposed the gateway and KC. What are your thoughts on my approach?
Are application-docker.properties necessary? Or I just can define all the properties in docker-compose file?
Do docker tutorial for Java Please
Please make a video for Docker
sir please make video on docker please and saga pattern ,auth services and ELK in this project.
Nice video. The docker desktop is not free now. So where and how do we install docker now?
could you please make a video for docker
Sir please make videos Angular
Yes needed 36:42
Could you make a playlist for keycloak? I would be interested in understanding how to manage roles and permissions
I already have a playlist for Keycloak, but it's missing the roles and permissions part, I will add this to my list.
@@ProgrammingTechie Thanks in advance, I really think this is the best programming channel. Well done!
despite every time reset the Keycloak's docker container we need get secret client agian ,for android client or IOS client that can set the secret client one time in their program per version,how to can handle it ?
A complete tutorial on Docker pls :)
Sure srividya 😁
@@ProgrammingTechie Yes we need that because a lot of the stuff in this section does not work unless there is some pre-existing docker configuration. Please walk us though setting that setup!
Sir please make video on docker with spring boot
I need a video docker tutorial for Java project
yeah make a docker videos
Could you please create a tutorial on how you set up a parent project and added other Spring Boot modules to it? I have been struggling to create a similar project structure and have been experiencing difficulties with version control when adding modules.
Check out my Maven Tutorial in the section multi module project.
@@ProgrammingTechie Why do you put postgres if the database you are using is Mysql that part I did not understand???? in the docker-compose.yml please
You are the best!
I have a question, when the docker profile is active, application-docker.properties is read and application.properties is not?
If so, shouldn't we copy all the information from application.properties to application-docker properties?how does it work?
Thanks!
Hi, when the docker profile is active, the properties configured inside the application-docker.properties are read, there is no need to copy the information one more time inside the docker properties file.
@@ProgrammingTechie java.lang.RuntimeException: Driver com.mysql.cj.jdbc.Driver claims to not accept jdbcUrl, jdbc:postgresql://postgres-order:5431/order-service- this error occurs when I See the Order service log(docker logs -f order-service)
@@shamilkagurusinghe2019 i have the same problem
edit the pom for postgresql @@shamilkagurusinghe2019
Is there any solution about it same error I've got too :( @@shamilkagurusinghe2019
33:05
Hi Man, you're the best. I have one doubt, when in docker profile, we have not added all the properties from application.properties to application-docker.properties. So, how does that work. You've just added the urls in application-docker.properties but other properties are missing. So I did not get how does this work.
The properties in the application.properties file are common across all the profiles.
So spring boot will only read the properties defined in the application-docker.properties file, rest of all it will read from application.properties.
In this case, I don't need to duplicate the properties in the application-docker.properties file if I have the same value as the original properties file .
@@ProgrammingTechie Thanks man, got it. You're the best.
When running Dockerfile of API Gateway at the start of the video I got
ERROR: failed to solve: lstat /var/lib/docker/tmp/buildkit-mount1536772929/target: no such file or directory
Can anyone help? I've searched for solutions but still not working.
I'm getting the same error. Did you find any fix?
Getting the following error:
=> ERROR [builder 4/4] RUN java -Djarmode=layertools -jar app.jar extract 0.3s
------
> [builder 4/4] RUN java -Djarmode=layertools -jar app.jar extract:
#9 0.336 Error: Unable to access jarfile app.jar
------
executor failed running [/bin/sh -c java -Djarmode=layertools -jar app.jar extract]: exit code: 1
Solution : I am using Eclipse and I needed to explicitly create the app.jar file using a Maven build. It works fine now. Not sure why you left this step out.
i have the same issue as you ,did you find a solution ?
@@ilyessaskri5701 Yes. He omitted the step where you have to run a Maven build for each application. I'm assuming that Intellij auto-generates the jar files but I'm not sure since I use eclipse. Eclipse definitely does not auto-generate them. Do the following steps for each app (module) in eclipse:
1. Right click on the application (module).
2. Select Run as -> Maven Build. On the dialog box within the "Goals" field enther "clean install -X"
3. Check the "Update Snapshots" and "Skip Tests" boxes.
4. Click Run to generate the jar files.
5. At the console within the current app folder (example -"../microservices-new/api-gateway>") execute "docker build -t apigateway-layered -f Dockerfile.layered ."
Copy the "Dockerfile.layered" file to each of the root folders of each app (module) and repeat the above steps.
@@tonegrail650 Thanks Man
@@tonegrail650 Thank you! At least for me, it also did not build the jar in Intellij.
In case anyone else finds this. In Intellij: "Run Anything" -> "mvn clean install -X" does the trick.
where we have to write setting.xml file???
It should be in c:\Users\\.m2\settings.xml
settings.xml ????
Hi, where can I find the settings.xml file?
User folder/.m2
where is setting.xml file???
It should be in c:\Users\\.m2\settings.xml
Sir how to contact you
you can drop an email at programmingtechie@gmail.com
Hi Nice tutorial. I am getting an error java.lang.RuntimeException: Driver com.mysql.cj.jdbc.Driver claims to not accept jdbcUrl, jdbc:postgresql://postgres-order:5431/order-service
Do I need to install Postgres?
Did u find the solution for this?
@@gayannanayakkara8386 Hi gayan ,I recieved same error.Were you able to resolve it?
@@vishalghanghav748 No. Then I tried with Mysql too. I think something is missing here where docker image inter connection create. Tried lots of ways and still not Luck. Had to give up. Let me know here if you were able to find a solution
@@gayannanayakkara8386 Ok ,I am trying .No success yet😐
java.lang.RuntimeException: Driver com.mysql.cj.jdbc.Driver claims to not accept jdbcUrl, jdbc:postgresql://postgres-order:5431/order-service- this error occurs when I See the Order service log(docker logs -f order-service)
Please refer to the GitHub repo, I created branches for each part, please verify your changes with the existing code.
Did you find a solution to this?
@@ProgrammingTechie I verified my changes from part 9 branch in github, but still facing the same error! :(
verify the inventory-server app.props )@@pradhidas
@@pradhidas were you able to resolve this issue?
nice video. where is next video refactored for k8S you mentioned?
please create a video on docker