Closed zyriuse75 closed 1 day ago
Hey @zyriuse75 , I had the same issue, but could fix it by replacing the .
with _
in the environment
block:
environment:
- keycloak_url=http://127.0.0.1:8080
- keycloak_user=admin
- keycloak_password=admin123
- import_files_locations=./config/*
- keycloak_ssl-verify=false
As per the documentation for the env variables.
This would indicate, IIUC, a possible blunder in the docker-compose.yaml, as it also uses .
instead of _
.
https://github.com/adorsys/keycloak-config-cli/blob/main/docker-compose.yml#L57-L63
hi @martinmeneval @zyriuse75
the project's documentation primarily focuses on using Docker run
commands, notDocker Compose
. Docker Compose has its own variable substitution mechanism that allows for dot notation in environment variables, which is why the project's docker-compose.yml file works differently for sure.
When using Docker Compose
, the environment variables with dot notation are not being correctly interpreted by the application inside the container. This is why you're seeing the error "Failed to bind properties under ``'keycloak'" and "keycloak.url Value: "null"".
To resolve this issue, you can modify your keycloak-cli.yaml file to use the correct environment variable format for Docker containers as stated by @martinmeneval
example
version: '3'
services:
keycloak-config-cli:
image: quay.io/adorsys/keycloak-config-cli:latest
environment:
- KEYCLOAK_URL=http://host.docker.internal:8080
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=your-password
- IMPORT_FILES_LOCATIONS=/config/*
- KEYCLOAK_SSL_VERIFY=false
volumes:
- ./config:/config
thank you for pointing that out.
the ticket https://github.com/adorsys/keycloak-config-cli/issues/825 can be closed already @Motouom
Current Behavior
hi everyone .
Currently i've an issue when i try to run keycloak-cli latest version when i run the command docker-compose -f keycloak-cli.yaml up
keycloak-config-cli
i get this output
the result of docker ps -a command as you can see keycloak is running
I ve read your documentation or that one i check different configuration on internet despite that i still don't find where is my issue .
Expected Behavior
keycloak-cli running without displaying the error Failed to bind properties under 'keycloak'.
Steps To Reproduce
No response
Environment
Anything else?
No response