[keycloak-user] Using Keycloak within docker compose and spring boot application
Thomas Recloux
thomas at recloux.fr
Wed Aug 2 01:18:49 EDT 2017
On Wed, Aug 2, 2017, at 00:05, Sebastian Eichholz wrote:
Hi Sebastian,
> keycloak:
> image: "jboss/keycloak-mysql:3.2.0.Final"
> container_name: "keycloak-with-mysql"
> ports:
> - "8087:8080"
This means that keycloak is listening on port 8080 within the container
put exposed on port 8080 of the host
> oregami:
> build: "./oregami-game-database-cqrs"
> ports:
> - "8080:8080"
> container_name: "oregami-docker"
> links:
> - "keycloak:keycloak"
> CMD ["/usr/bin/java", "-jar",
> "-Dkeycloak.auth-server-url=http://keycloak:8087/auth", "/app.jar"]
With the container link, your spring boot app can access the container
directly, then the port should be 8080, not 8087.
I suggest to use public names and reverse proxy like Traefik
(https://traefik.io/)
Thomas
More information about the keycloak-user
mailing list