The keycloak container isn't persistent...
The keycloak client secret is known only after creating the client, but when the docker-compose file is running you can't change the env vars of the proxy container... once you change the environment variable you need to restart the compose file, which restarts keycloak and resets the client.
What I did is i added a persistent postgres container & set keycloak to use the postgres db.