Image built w/ database and url already configured
When trying to stand up a new keycloak using docker-compose I get an error of;
keycloak | 2022-08-01 20:00:23,042 WARN [io.quarkus.runtime.configuration.ConfigRecorder] (main) Build time property cannot be changed at runtime:
keycloak | - quarkus.http.root-path is set to '/auth' but it is build time fixed to '/'. Did you change the property quarkus.http.root-path after building the application?
and
keycloak | 2022-08-02 21:59:03,811 WARN [io.quarkus.runtime.configuration.ConfigRecorder] (main) Build time property cannot be changed at runtime:
keycloak | - quarkus.datasource.jdbc.driver is set to 'org.postgresql.xa.PGXADataSource' but it is build time fixed to 'org.h2.jdbcx.JdbcDataSource'. Did you change the property quarkus.datasource.jdbc.driver after building the application?
keycloak | 2022-08-02 21:59:03,900 WARN [io.agroal.pool] (agroal-11) Datasource '<default>': No suitable driver found for jdbc:postgresql://keycloak_db:5432/keycloak
keycloak | 2022-08-02 21:59:03,901 WARN [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator] (JPA Startup Thread: keycloak-default) HHH000342: Could not obtain connection to query metadata: java.sql.SQLException: No suitable driver found for jdbc:postgre
sql://keycloak_db:5432/keycloak
But if I pull quay.io/keycloak/keycloak:19.0.1 I don't have the same issues, it use the external postgres database and I can change the url to /auth; This is my docker-compose.yml
version: '3.7'
services:
keycloak-test: #auth
container_name: keycloak-test
environment:
- KC_DB=postgres
- KC_DB_URL_HOST=keycloak_db-test
- KC_DB_URL_DATABASE=keycloak
- KC_DB_USERNAME=keycloak
- KC_DB_SCHEMA=public
- KC_DB_PASSWORD=password
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=Pa55w0rd
- PROXY_ADDRESS_FORWARDING='true'
depends_on:
- postgres-test
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
image: quay.io/keycloak/keycloak:19.0.1
networks:
- local-test
- external-test
command:
- start
- --http-relative-path=/auth
- --http-enabled=true
- --hostname-strict-https=false
- --hostname-strict=false
- --proxy=edge
restart: always
ports:
- "8081:8080"
keycloak_db-test:
container_name: keycloak_db-test
image: registry1.dso.mil/ironbank/opensource/postgres/postgresql12
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
networks:
- local-test
- external-test
restart: always
networks:
local-test:
driver: bridge
internal: true
external-test:
driver: bridge