By default, in-memory db is used. If you want to use PostgreSQL with RHDH, here are the steps:
NOTE: You must have Red Hat Login to use
postgresqlimage.
-
Login to container registry with Red Hat Login credentials to use
postgresqlimagepodman login registry.redhat.io
If you prefer
dockeryou can just replacepodmanwithdockerdocker login registry.redhat.io
-
Uncomment the
dbservice block in compose.yaml filedb: image: "registry.redhat.io/rhel8/postgresql-16:latest" volumes: - "/var/lib/pgsql/data" env_file: - path: "./default.env" required: true - path: "./.env" required: false environment: - POSTGRESQL_ADMIN_PASSWORD=${POSTGRES_PASSWORD} healthcheck: test: ["CMD", "pg_isready", "-U", "postgres"] interval: 5s timeout: 5s retries: 5
-
Uncomment the
dbsection in thedepends_onsection ofrhdhservice in compose.yamldepends_on: install-dynamic-plugins: condition: service_completed_successfully db: condition: service_healthy
-
Comment out the SQLite in-memory configuration in
app-config.local.yaml# database: # client: better-sqlite3 # connection: ':memory:'
-
Add Postgres configuration in
app-config.local.yamldatabase: client: pg connection: host: ${POSTGRES_HOST} port: ${POSTGRES_PORT} user: ${POSTGRES_USER} password: ${POSTGRES_PASSWORD}