Repository navigation
Replies: 1 comment
|
i found error, jdbc url was not correct. KC_DB_URL: jdbc:postgresql://postgresql:5432/keycloak works |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi i try to create a docker-compose file to easily start keycloak with a postgres database. This si currently my approach
`version: '2.3'
services:
postgresql:
image: postgres
container_name: postgresql
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: cumo
POSTGRES_PASSWORD: password
mycompany-keycloak:
image: mycompany-keycloak:local
mem_limit: 1G
memswap_limit: 1G
container_name: mycompany-keycloak
ports:
- 8109:8080
entrypoint: ["/opt/keycloak/bin/kc.sh","-v","--spi-login-protocol-openid-connect-legacy-logout-redirect-uri=true", "start-dev"]
environment:
KC_DB: postgres
KC_HOSTNAME_STRICT: "false"
KC_DB_URL: jdbc:postgres://postgresql:5432/keycloak
KC_DB_USERNAME: user
KC_DB_PASSWORD: password
KC_LOG_LEVEL: INFO
KC_HOSTNAME_PATH: domain/v3/auth
KC_HTTP_RELATIVE_PATH: /auth
KC_HOSTNAME_ADMIN_URL: https://localhost:8109/domain/v3/auth
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: adminPassword
KEYCLOAK_CLIENT_SECRET: g3h3im
KC_HOSTNAME_STRICT_HTTPS: 'false'
`
When i run docker-compose mycompany-keycloak up -d
then i get the error "Caused by: org.postgresql.util.PSQLException: Connection to localhost:5432 refused." but that confuses me because i added property KC_DB_URL with value jdbc:postgres://postgresql:5432/keycloak
All reactions