Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-19894

Setting the DB_URL environment variable doesn't work in the Artifactory OSS docker image

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Pending QA
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Docker, Docker Image
    • Labels:
      None

      Description

      This was reported by a customer in the GitHub helm charts projects: https://github.com/jfrog/charts/issues/441

       

      When using the OSS Artifactory Docker image, setting the DB_URL environment variable doesn't work. Even if you didn't specify the DB_HOST parameter, it will use the default DB_HOST which is set to the DB_TYPE (e.g. postgresql). 

      Steps to reproduce:

      Run the OSS docker image:

      docker run -e DB_USERNAME=artifactory -e DB_PASSWORD=password -e DB_TYPE=postgresql -e DB_URL=jdbc:postgresql://postgres123-postgresql:5432/artifactory -it --rm docker.bintray.io/jfrog/artifactory-oss:6.11.3

       

       

      You will see the following:

       

      In the "Waiting for DB" line you can see that the DB_HOST is used instead of the DB_URL.

       

      Looking at the entrypoint-docker.sh script, I found that we first set the DB_URL properly in the db.properties file, but after that we replace it with the DB_HOST (which is set to the DB_TYPE by default, which is obviously wrong for 99% of the cases). The reason for that is that unlike in the artifactory-pro image, the DB_HOST check and replace is not in an "else" clause with the DB_URL check.

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            daniele Daniel Ezer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: