version: "2.2" networks: keycloak: ipam: config: - subnet: 10.0.1.0/24 loadbalancing: ipam: config: - subnet: 10.0.2.0/24 services: mariadb: build: db/mariadb image: keycloak_test_mariadb:${KEYCLOAK_VERSION:-latest} cpus: 1 networks: - keycloak environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: keycloak MYSQL_USER: keycloak MYSQL_PASSWORD: keycloak ports: - "3306:3306" keycloak: build: keycloak image: keycloak_test_keycloak:${KEYCLOAK_VERSION:-latest} depends_on: mariadb: condition: service_healthy cpus: 1 networks: - keycloak environment: CONFIGURATION: standalone-ha.xml PUBLIC_SUBNET: 10.0.1.0/24 PRIVATE_SUBNET: 10.0.1.0/24 MARIADB_HOST: mariadb MARIADB_DATABASE: keycloak MARIADB_USER: keycloak MARIADB_PASSWORD: keycloak KEYCLOAK_USER: admin KEYCLOAK_PASSWORD: admin JAVA_OPTS: ${KEYCLOAK_JVM_MEMORY:--Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m} -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true HTTP_MAX_CONNECTIONS: ${KEYCLOAK_HTTP_MAX_CONNECTIONS:-500} AJP_MAX_CONNECTIONS: ${KEYCLOAK_AJP_MAX_CONNECTIONS:-500} WORKER_IO_THREADS: ${KEYCLOAK_WORKER_IO_THREADS:-2} WORKER_TASK_MAX_THREADS: ${KEYCLOAK_WORKER_TASK_MAX_THREADS:-16} DS_MIN_POOL_SIZE: ${KEYCLOAK_DS_MIN_POOL_SIZE:-10} DS_MAX_POOL_SIZE: ${KEYCLOAK_DS_MAX_POOL_SIZE:-100} DS_POOL_PREFILL: "${KEYCLOAK_DS_POOL_PREFILL:-true}" DS_PS_CACHE_SIZE: ${KEYCLOAK_DS_PS_CACHE_SIZE:-100} ports: - "8080" - "9990" keycloak_lb: build: load-balancer/wildfly-modcluster image: keycloak_test_wildfly_modcluster:${KEYCLOAK_VERSION:-latest} depends_on: keycloak: condition: service_healthy cpus: 1 networks: - keycloak # - loadbalancing environment: PRIVATE_SUBNET: 10.0.1.0/24 # PUBLIC_SUBNET: 10.0.2.0/24 JAVA_OPTS: ${KEYCLOAK_LB_JVM_MEMORY:--Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m} -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true HTTP_MAX_CONNECTIONS: ${KEYCLOAK_LB_HTTP_MAX_CONNECTIONS:-500} WORKER_IO_THREADS: ${KEYCLOAK_LB_WORKER_IO_THREADS:-2} WORKER_TASK_MAX_THREADS: ${KEYCLOAK_LB_WORKER_TASK_MAX_THREADS:-16} ports: - "8080:8080" # advertize_server: # build: load-balancer/debug-advertise # image: keycloak_test_modcluster_advertize_server:${KEYCLOAK_VERSION:-latest} # networks: # - keycloak # - loadbalancing # command: 0.0.0.0 224.0.1.105 23365 # # advertize_client: # build: # context: load-balancer/debug-advertise # dockerfile: Dockerfile-client # image: keycloak_test_modcluster_advertize_client:${KEYCLOAK_VERSION:-latest} # networks: # - keycloak # - loadbalancing # command: 224.0.1.105 23364