How To Create Multi Containers Using Docker Compose | For SpringBoot & Postgresql

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ย. 2024

ความคิดเห็น • 22

  • @Akshay-wp1rg
    @Akshay-wp1rg ปีที่แล้ว +3

    I'm getting communication link failure I have given all properties and creditentails correctly. But I don't know and I have tried many way them too I'm facing this issue, can proved me with any solutions?

    • @CodeVice111
      @CodeVice111  ปีที่แล้ว

      You might see console log errors. But still try accessing swagger endpoint. If it's opening then your container is up. and make sure the connection properties are accurate as per the video. And make sure you've restart:always configured for both the containers for retry-fallback mechanism.

  • @anmoldodwad2125
    @anmoldodwad2125 ปีที่แล้ว +2

    When i add the dynamic variables ${db-url} etc and try to build my springboot application there is a error for connectivity with postgresql server. I think its because there is not container for postgres yet and therefore no DB , when should I build the springboot application with those changes or without them ??

    • @CodeVice111
      @CodeVice111  ปีที่แล้ว

      U may encounter this connection err. Thats why we are adding a retry fallback option called "restart: always" in docker compose. Now 2nd thing is.. even though there is an err.. still.. try accessing swagger or thru postman etc.. and do insert 1 record.

  • @DinidiDeeds
    @DinidiDeeds 3 หลายเดือนก่อน

    very nice video, but I have a question, you placed a pgadmin in the docker-compose, what do you use now the pgadmin installed in the machine? I would like to use the pgadmin placed in the docker compose, but it does not work.

    • @CodeVice111
      @CodeVice111  3 หลายเดือนก่อน

      I have separately installed pgAdmin. Its not running as a container.

    • @CodeVice111
      @CodeVice111  3 หลายเดือนก่อน

      I have installed pgAdmin separately.

  • @mrpipiskin4
    @mrpipiskin4 ปีที่แล้ว +1

    Thank you very much for help. It would be much cooler if you do git repo for every video.

    • @CodeVice111
      @CodeVice111  ปีที่แล้ว

      Oh I see. Sure. I'll keep that in mind. Thanks 😊

  • @chrisogwuche9645
    @chrisogwuche9645 ปีที่แล้ว

    Thank you

  • @davronabdusalomov3373
    @davronabdusalomov3373 10 หลายเดือนก่อน

    Thanks! But it would be great if you solved the connection issue!

    • @CodeVice111
      @CodeVice111  10 หลายเดือนก่อน

      Point taken. 😊

  • @DinidiDeeds
    @DinidiDeeds 3 หลายเดือนก่อน

    and also why did you make the application dockerfile?
    can i have you github ?

    • @CodeVice111
      @CodeVice111  3 หลายเดือนก่อน

      Sorry for that, I've not kept it in GitHub.
      But, point taken. Thanks for watching.

  • @V_Smah
    @V_Smah ปีที่แล้ว

    Could you share a link to the github repository of this project?

    • @CodeVice111
      @CodeVice111  3 หลายเดือนก่อน

      Unfortunately, I've not kept it in git.

  • @abdirahmanabdullahi5471
    @abdirahmanabdullahi5471 8 หลายเดือนก่อน

    Cant access my web application from the browser

    • @CodeVice111
      @CodeVice111  7 หลายเดือนก่อน

      please check whether desired number of containers are up and running or not, by simply running `docker ps `. or `docker ps --all`.
      If your desired containers are listed. Then you can
      trace the exact log of individual container with this command called: `docker logs `. Thanks for watching.

  • @Maha-qp4dz
    @Maha-qp4dz 4 หลายเดือนก่อน

    Hi , I'm trying to deploy my springapplication + postgres , I have created a docker file , created my docker compose file, I have successfully ran "docker-compose build", but on running , i got this below error: "Cannot invoke "org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(java.sql.SQLException, String)" because the return value of "org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.sqlExceptionHelper()" is null " kindly help me to resolve this issue

    • @CodeVice111
      @CodeVice111  4 หลายเดือนก่อน

      Sure buddy.
      Could you please help me what are you getting when u check the followings:
      1. After executing "docker-compose up" are you able to see 2 running containers when you do "docker ps"? (Y/N)
      2. Able to connect to db from pgAdmin? Before testing the db connection Spring boot app. (Y/N)
      3. Both containers must on the same docker network. (Y/N)
      4. If the above things are good. Doble check the db connection in your app.yaml file.
      Do leme know what you see buddy