# Version 2 is the latest that is supported by docker-compose in # Ubuntu Xenial. version: '2' services: keycloak: image: quay.io/keycloak/keycloak:legacy network_mode: host restart: always environment: - KEYCLOAK_USER=admin - KEYCLOAK_PASSWORD="{{ keycloak_admin_password }}" - DB_VENDOR=h2 - PROXY_ADDRESS_FORWARDING=true command: -Djboss.bind.address.private=127.0.0.1 -Djboss.bind.address=127.0.0.1 volumes: - /var/keycloak/data:/opt/jboss/keycloak/standalone/data - /var/log/keycloak:/opt/jboss/keycloak/standalone/log