Search code examples
postgresqldockerartifactory

Artifactory with docker-compose not able to use postgresql


I am trying to run latest Artifactory 7 OSS with docker-compose. And I do not want to use Derby database, but postgresql.

According to the documentation, I need to define the ENV variables:

environment:
  - DB_TYPE=postgresql
  - DB_USER=user
  - DB_PASSWORD=mypass
  - DB_URL=jdbc:postgresql://postgresql-docker:5432/database

That seems correct, but when launching the server, I get:

java.lang.RuntimeException: Driver org.apache.derby.jdbc.EmbeddedDriver claims to not accept jdbcUrl, jdbc:postgresql://postgresql-docker:5432/database

Seems that is still using the Derby driver and not the postgresql (that I expect by using the parameter DB_TYPE).

How can I force it to use postgresql? There is no DB_TYPE variable or similar on the documentation. Which ones are the correct parameters for Artifactory 7 OSS?


Solution

  • Ok, seems that I am following a deprecated documentation. Looking into the logs, the variables on the docker must now be:

      - JF_SHARED_DATABASE_TYPE=postgresql
      - JF_SHARED_DATABASE_USERNAME=user
      - JF_SHARED_DATABASE_PASSWORD=mypass
      - JF_SHARED_DATABASE_URL=jdbc:postgresql://postgresql-docker:5432/database
    

    And searching more, now I have an extra variable:

    JF_SHARED_DATABASE_DRIVER=org.postgresql.Driver
    

    That is the one that solves the problem.