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

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

Комментарии • 24

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

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

  • @DinidiDeeds
    @DinidiDeeds 5 месяцев назад

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

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

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

      I have installed pgAdmin separately.

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

    Thank you

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

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

  • @DinidiDeeds
    @DinidiDeeds 5 месяцев назад

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

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

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

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

    Cant access my web application from the browser

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

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

      Unfortunately, I've not kept it in git.

  • @smnk1073
    @smnk1073 7 дней назад

    Hello, I have configured the db service and backend service with the same username and password, but it showing me exception 'password not matched for the user'. can you please help me to resolve it ?

    • @CodeVice111
      @CodeVice111  7 дней назад

      Please check for typo and whitespace s on your password, if any. If you have pgAdmin4 try connecting to the database first. Then you can validate from backend app.
      Thank you

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

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

      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