Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-5842

Fix documentation for connecting to multiple devservice databases

XMLWordPrintable

      I had some difficulties connecting to the devservices databases of a service with multiple datasources because the [documentation in the Dev Services for Databases guide](https://quarkus.io/guides/databases-dev-services#connect-to-database-run-as-a-dev-service) is wrong.

          1. How to verify

      Inspect the devservice database containers of a multi-datasource application with `docker inspect`.

      Here are the env vars of the postgres container for the named datasource "db1":

      ```shell
      $ docker container inspect unruffled_franklin --format 'json .Config.Env' | jq -r '.[]' | grep POSTGRES
      POSTGRES_USER=quarkus
      POSTGRES_PASSWORD=quarkus
      POSTGRES_DB=db1
      ```

      For reference, these are the corresponding env vars from a devservices container for the default database in a single-datasource setup:
      ```shell
      $ docker container inspect clever_murdock --format 'json .Config.Env' | jq -r '.[]' | grep POSTGRES
      POSTGRES_USER=quarkus
      POSTGRES_PASSWORD=quarkus
      POSTGRES_DB=quarkus
      ```

      This PR fixes the issue.

              Unassigned Unassigned
              blafond Barry LaFond
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: