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

Поделиться
HTML-код
  • Опубликовано: 4 дек 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.

  • @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 😊

  • @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.

  • @chrisogwuche9645
    @chrisogwuche9645 Год назад

    Thank you

  • @davronabdusalomov3373
    @davronabdusalomov3373 11 месяцев назад

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

  • @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.

  • @abdirahmanabdullahi5471
    @abdirahmanabdullahi5471 8 месяцев назад

    Cant access my web application from the browser

    • @CodeVice111
      @CodeVice111  8 месяцев назад

      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.

  • @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.

  • @Maha-qp4dz
    @Maha-qp4dz 5 месяцев назад

    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  5 месяцев назад

      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