version: '3' volumes: keycloak-db-data: driver: local services: postgres: image: postgres:13.7 container_name: postgres healthcheck: test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"] volumes: - keycloak-db-data:/var/lib/postgresql/data environment: POSTGRES_DB: keycloak POSTGRES_USER: kc POSTGRES_PASSWORD: phai6ahphaimahguo6ia1OFaighe6G keycloak: #depends_on: postgres build: . container_name: keycloak environment: #Admin Credentials #KC_HOSTNAME_STRICT: 'false' #KC_HOSTNAME_STRICT_HTTPS: 'false' KEYCLOAK_ADMIN: admin KEYCLOAK_ADMIN_PASSWORD: MyKeycloak493 KC_DB_URL: 'jdbc:postgresql://postgres/keycloak' KC_DB_USERNAME: kc KC_DB_PASSWORD: phai6ahphaimahguo6ia1OFaighe6G KC_HEALTH_ENABLED: 'true' KC_METRICS_ENABLED: 'true' KC_HOSTNAME: https://auth.iwakura.rip PROXY_ADDRESS_FORWARDING: "true" command: "start --optimized --proxy-headers forwarded --proxy edge" ports: - 8080:8080 depends_on: - postgres