docker compose example | spring boot & mysql docker-compose

Sdílet
Vložit
  • čas přidán 25. 12. 2021
  • How to deploy spring boot and mysql in docker container using docker-compose .
    git link: gitlab.com/codingboot-youtube...
    Deploy spring boot & mysql using docker
    • Docker spring boot MyS...
  • Věda a technologie

Komentáře • 87

  • @JustAUsernameIGuess
    @JustAUsernameIGuess Před rokem +3

    Been having trouble with this for a while now, and your video was what helped to finally get my project up and running. Thanks!

  • @pablon3115
    @pablon3115 Před rokem +3

    Thank you very much for this video and the previous one. It is much more valuable than most paid courses on platforms. You went straight to the point with an excellent practical example. I've followed step-by-step everything you've done, and everything works perfectly.

  • @rex5120
    @rex5120 Před rokem +11

    is there someone snoring in the background on min 9:41 ?????

  • @petersteel7735
    @petersteel7735 Před rokem +1

    I followed the process slightly in a different way.
    I used buildpacks to build the dockerfile(no dockerfile actually, buildpacks were making the image in the background),
    and postgres.
    I managed to do everything the tutorial was trying to teach. One thing I stumbled was that when I was doing docker compose down,
    I sometimes had to remove the stopped containers else the database was acting weird and I had errros.
    Other that that, it was an amazing tutorial mate! thank you very much! Liked and subscribed!!

  • @user-yx1ey2rn3k
    @user-yx1ey2rn3k Před 4 měsíci +1

    Really detailed and concise, thank you sir!
    Just solved the problem been bothering me for days by seeing your video.

  • @sanjayshah4218
    @sanjayshah4218 Před 2 lety +1

    Sir, It's awesome, I have basic ideas of docker and I was trying to learn advance docker my own but not able to start and getting irritation and last left but when I randomly watched your video, I say it's simply awesome. Thank you so much and going to subscribe to your channel to get more and more.

  • @soham7510
    @soham7510 Před rokem +1

    I dont even use java, I wanted to use it for a golang app and this video did explain everything very clearly, thanks sir :)

  • @vanamutt43
    @vanamutt43 Před 2 lety +1

    absolute legend, mate. helped a lot, thanks.

  • @obioraokwubanego4789
    @obioraokwubanego4789 Před 5 měsíci +1

    Great job. Thanks

  • @nguyenhuusang5403
    @nguyenhuusang5403 Před 2 lety +1

    So good. Thank you for video.

  • @coisa_thing
    @coisa_thing Před 2 lety +1

    Thank you guy, good job!

  • @anubhavnigam7611
    @anubhavnigam7611 Před 2 lety

    Don't we have to use links command with spring boot service to link it with MySQL service so that it is able to connect to MySQL container name and its corresponding container specific host 3306?

  • @karel8y
    @karel8y Před 2 lety +1

    Enjoying your video's as you give more detail which is very usefull. Thanks!

  • @kmm.asamhussain
    @kmm.asamhussain Před rokem +1

    Great explanation, Keep it up

  • @arthurezeagbo3986
    @arthurezeagbo3986 Před 2 lety +1

    Thank you

  • @javatips5979
    @javatips5979 Před 6 měsíci +1

    you are the king

  • @nailtagiyev6340
    @nailtagiyev6340 Před rokem +2

    Thank you very much

  • @kumarguru3044
    @kumarguru3044 Před rokem

    when I tried using Postman with the POST method to insert data it is not inserted in the database. But it is stored in the volume that I have created

  • @priyaghadgevlog
    @priyaghadgevlog Před 9 měsíci +1

    Thank you very much sir . I really appreciate the video due to excellent hand son practical. really help me a lot ....and finnaly my project is up and running

    • @codingboot455
      @codingboot455  Před 9 měsíci

      I'm glad the video was helpful for your project. If you have any more questions, just let me know. Good luck!

  • @tayeblagha484
    @tayeblagha484 Před rokem +1

    amazing tutorial

  • @kaancolakoglu3056
    @kaancolakoglu3056 Před rokem +4

    I Kiss your eyes ! Thanks man !!!!!

  • @ahasanulhadi4654
    @ahasanulhadi4654 Před rokem +1

    you can use "depends_on" attribute for starting services in order

  • @Saurabhnaik
    @Saurabhnaik Před rokem +1

    Thanks

  • @prathameshhiremath1379
    @prathameshhiremath1379 Před 4 měsíci +1

    i want to ask question sir in application properties y u not mentioned username and password as root because in yml file u mention as root
    is it compulsary to have different???? in both?

  • @dmytro4312
    @dmytro4312 Před 2 lety +1

    thank you man)

  • @narendrakaduru2603
    @narendrakaduru2603 Před 8 měsíci +1

    lol - lots of ❤❤❤❤

  • @debashisjena9866
    @debashisjena9866 Před 8 měsíci

    hi,
    i am unable to create connection using 3307 showing error. please help

  • @jyotikansal191
    @jyotikansal191 Před rokem +1

    Which IDE you are using for creating docker compose file?

  • @dogomation556
    @dogomation556 Před rokem +1

    Hey i need some help.When I am rebuild the jar after adding the properties of mysql in the application.properties file the build is not getting successful. During mvn package the app is not able to connect to mysql

    • @codingboot455
      @codingboot455  Před rokem

      Do you want connect MySQL container or host machine MySQL?
      Please make sure to specify env variable while connecting to container

  • @jasper5016
    @jasper5016 Před 2 lety +2

    Thanks a lot for this video. its very useful. Can you also cover communication between Micro-services?

    • @codingboot455
      @codingboot455  Před 2 lety +1

      czcams.com/video/evZwss6HYto/video.html

    • @jasper5016
      @jasper5016 Před 2 lety +1

      @@codingboot455 Thanks brother.

  • @skkar2k2
    @skkar2k2 Před rokem +1

    Awesome... One question...In order to connect from Spring app to MySQL, don't we need to setup network in docker-compose?

    • @codingboot455
      @codingboot455  Před rokem +1

      Docker compose automatically create a network and attached to all services. You can also create custom network and configure in yml file

    • @skkar2k2
      @skkar2k2 Před rokem +1

      @@codingboot455 Wow... I didn't know that. Thank you for the clarification.

  • @meenatchisundar4679
    @meenatchisundar4679 Před rokem

    i ve one doubt. U r connecting Dbeaver with mysql host localhost user and pwd as root and db as test and port as 3307. When u r telling host as localhost whether its an local db or container db? Suppose u r running spring boot app instance in docker container and not in localhost, db will be persisted to container db and not in local db. Then why r u restarting and checking in local db with localhost and not in container db. And another doubt if u add more data in container db and not in local db. Suppose if u remover container db and again create cont db, whether through volume, it will sync up in both sides and if i make any changes in localdb whether it will sync with container db and vice versa. I dont know whether am making things complicated or not

  • @chickenchicken6750
    @chickenchicken6750 Před 14 dny +1

    How to test it with postman ?, why you create db folder in destop ?

    • @codingboot455
      @codingboot455  Před 14 dny

      Same url you can hit in postman . Db folder you can create anywhere with any name .

  • @jyotikansal191
    @jyotikansal191 Před rokem

    Sir pls answer one more question ,what is difference between java application and spring boot application?

  • @jayanth-gh2wx
    @jayanth-gh2wx Před 5 měsíci

    while running docker-compose i am getting this error everytime and i am not able to go forward even jar file is there in target it is showing this error ( "ERROR [springboot-app internal] load build context 0.0s")
    but i am able to do this using just dockerfile for normal text message but i am not able to do docker-compose

    • @codingboot455
      @codingboot455  Před 5 měsíci

      Can you please post your complete log trace ?

  • @Omer-fr1ze
    @Omer-fr1ze Před 2 lety +2

    Great video! How does it work without network configs?

    • @codingboot455
      @codingboot455  Před 2 lety

      docker-compose create network and attach to the container. We don't need to do manually. You can also see in console

  • @Thepixels21
    @Thepixels21 Před 3 měsíci +1

    You're God

  • @shwethkenkre3980
    @shwethkenkre3980 Před rokem +1

    i am still getting errors even after doing the restart: always step in docker-compose.yml. any solution??

  • @cherokeexxx1
    @cherokeexxx1 Před rokem +1

    Excelent video, but i need to dockerize a microservice and make the deployment with Eureka. Do you have a tutorial doing this ?. Awaiting your reply and one more time, congratulations. :)

    • @codingboot455
      @codingboot455  Před rokem

      Thanks 😊, same process for microservice as it's a spring boot application.
      czcams.com/video/evZwss6HYto/video.html
      Microservice with Eureka ,confiserver ... zookeeper and more....
      Will upload a video soon

    • @cherokeexxx1
      @cherokeexxx1 Před rokem

      Just one more question. I tried a lot to deploy 6 microservices using docker and 5 of them are deployed successfully but the microservice that you developed in the video can not be caught by eureka. Why ?. how can i make it ?. The only one error i got is the following: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
      Picked up JAVA_TOOL_OPTIONS: -Djava.security.properties=/layers/paketo-buildpacks_bellsoft-liberica/java-security-properties/java-security.properties -XX:+ExitOnOutOfMemoryError -XX:ActiveProcessorCount=4 -XX:MaxDirectMemorySize=10M -Xmx4510936K -XX:MaxMetaspaceSize=153415K -XX:ReservedCodeCacheSize=240M -Xss1M -XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=summary -XX:+PrintNMTStatistics -Dorg.springframework.cloud.bindings.boot.enable=true
      The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
      at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-java-8.0.30.jar:8.0.30]
      at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-java-8.0.30.jar:8.0.30]
      at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828) ~[mysql-connector-java-8.0.30.jar:8.0.30]
      at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:448) ~[mysql-connector-java-8.0.30.jar:8.0.30]
      at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241) ~[mysql-connector-java-8.0.30.jar:8.0.30]
      at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198) ~[mysql-connector-java-8.0.30.jar:8.0.30]
      at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-4.0.3.jar:na]
      at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) ~[HikariCP-4.0.3.jar:na]
      at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[HikariCP-4.0.3.jar:na]
      at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) [HikariCP-4.0.3.jar:na]
      at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) [HikariCP-4.0.3.jar:na]
      at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:115) [HikariCP-4.0.3.jar:na]
      at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) [HikariCP-4.0.3.jar:na]
      at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) [hibernate-core-5.6.10.Final.jar:5.6.10.Final]...
      but Eureka is not registering the microservice you developed in the video with the database. Please help.

  • @AjayKumar-lm4yr
    @AjayKumar-lm4yr Před rokem +1

    Sir, multiple microservices main, main sarvice ka kaise pata kar sakte hai, ki pehle kon si chalge fir kon

    • @codingboot455
      @codingboot455  Před rokem +1

      Wo to url se pata chalega , aur code flow

    • @AjayKumar-lm4yr
      @AjayKumar-lm4yr Před rokem

      @@codingboot455 Sir, main devops se hu to mujhe bas code deploy karna hota hai Docker par. main confused ho jata hu ki itni sari file main se kon si main file hai , or kon si file chalne ke baad hi dusri kon si file chalani hai, or kya hum ye sab kuch local par hi check kar sakte hai kya, or ye spring boot or java dono alag-alag hai kya.
      SIr, please let me know how can i understand all this things.
      Thanks.❤😊

    • @codingboot455
      @codingboot455  Před rokem +1

      Microservice me gateway service entrypoint hota hai . Based on uri request is redirected to service.
      Based on configuration file properties/yml everything is taken care . For deployment you can deploy services individually

  • @comptegmail273
    @comptegmail273 Před rokem +1

    Hi sir can I email you I'm having a problem in my Docker compose file

    • @codingboot455
      @codingboot455  Před rokem +1

      What is the issue ? could please share

    • @comptegmail273
      @comptegmail273 Před rokem

      @@codingboot455 here is my question on stackoverflow Please get back to me when you can and thank you so much stackoverflow.com/questions/74233854/docker-compose-on-jenkins-pipeline-not-working?noredirect=1#

  • @abhilekhsahay
    @abhilekhsahay Před 2 lety +5

    piche koi kharata mar rha h

    • @codingboot455
      @codingboot455  Před 2 lety +1

      Hope this video content was helpful for you too ☺️

    • @himanshu6665
      @himanshu6665 Před 7 měsíci

      Hii plzz we need kubernatec now

  • @purnasahu8766
    @purnasahu8766 Před rokem +2

    Your content is really good but u r not uploading videos on regular basis.last video was 1 year ago.
    Please upload more SpringBoot projects/ content/information and grow your channel also help us to enhance our skills.
    I found your channel, while searching for Jasper report content.
    Thanks.

    • @codingboot455
      @codingboot455  Před rokem

      Thank you Sahu. Yesh that's true I'm able to upload on regular basis. I will be uploading soon..

  • @wycliffeottawa7998
    @wycliffeottawa7998 Před měsícem

    someone snoring in the bckground

  • @himanshu6665
    @himanshu6665 Před 7 měsíci

    Hyu plzz kubernetec

  • @Misster_Lis
    @Misster_Lis Před rokem +1

    КТО ТАМ ХРАПИТ БМЯДЬ

    • @codingboot455
      @codingboot455  Před 4 měsíci

      Извините, буду внимательнее. Спасибо!