Configure Xray HA to Use PostgreSQL Database in HA

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
ft:sourceType
Paligo

Available from Xray 3.55.2

When you configure Xray to use PostgreSQL, all the information about components is stored in PostgreSQL.

  1. Stop the Xray service.

  2. Edit the system.yaml file to update the following values.Theurlfield under the shareddatabase section in the following format.

    "postgres://<PostgreSQL Database 1 URL>,..., <PostgreSQL Database N URL>/xraydb?sslmode=disable&target_session_attrs=read-write"

    The following sample shows an examplesystem.yamlfile configuration.

    systemYaml:
     shared:
       security
       ...
       logging:
       ...
       database:
         type: postgresql
         url: "postgres://10.90.100.110:5445,10.90.100.110:5446/xraydb?sslmode=disable&target_session_attrs=read-write"
         driver: org.postgresql.Driver
         username: xray
         password: xray
       jfrogUrl: <JFrog URL>
       security:
         joinKey: <Artifactory Join Key>
       rabbitMq:
         autoStop: true
         url: "amqp://localhost:5672/"
       ...
  3. Start the Xray service.