Created
August 3, 2017 09:01
-
-
Save jmkgreen/b79f95c3eca2eac3fb66c66d12017f07 to your computer and use it in GitHub Desktop.
KeyCloak docker-compose file for swarm stack launch purposes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
keycloak: | |
image: jboss/keycloak-mysql | |
environment: | |
- constraint:serverclass==gateway | |
- PROXY_ADDRESS_FORWARDING=true | |
- MYSQL_USER=keycloak | |
- MYSQL_PASSWORD=keycloak | |
- MYSQL_PORT_3306_TCP_ADDR=mysql | |
- MYSQL_PORT_3306_TCP_PORT=3306 | |
networks: | |
- keycloak_self | |
- http_proxy | |
deploy: | |
labels: | |
- "traefik.port=8080" | |
- "traefik.docker.network=http_proxy" | |
- "traefik.frontend.rule=Host:keycloak-test.example.net, keycloak.example.net" | |
placement: | |
constraints: | |
- node.role != manager | |
mysql: | |
image: mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=my-root-password | |
- MYSQL_DATABASE=keycloak | |
- MYSQL_USER=keycloak | |
- MYSQL_PASSWORD=keycloak | |
volumes: | |
- mysql:/var/lib/mysql | |
networks: | |
- keycloak_self | |
deploy: | |
placement: | |
constraints: | |
- node.role != manager | |
volumes: | |
mysql: | |
driver: glusterfs | |
networks: | |
keycloak_self: | |
external: true | |
http_proxy: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment