version: "3.8" services: postgres_keycloak: container_name: postgres_keycloak image: postgres:14 environment: KEYCLOAK_DB_HOST: localhost POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} POSTGRES_DB: keycloak_db healthcheck: test: "exit 0" ports: - "5433:5432" volumes: - ./pgdata_keycloak:/var/lib/postgresql/data restart: unless-stopped keycloak: image: quay.io/keycloak/keycloak:legacy container_name: keycloak environment: TZ: Europe/Moscow DB_VENDOR: POSTGRES DB_ADDR: postgres_keycloak DB_DATABASE: keycloak_db DB_USER: ${POSTGRES_USER:-postgres} DB_PASSWORD: ${POSTGRES_PASSWORD:-postgres} KEYCLOAK_USER: admin KEYCLOAK_PASSWORD: admin_password KEYCLOAK_PORT: 8080 KEYCLOAK_HOST: localhost restart: unless-stopped healthcheck: test: "exit 0" ports: - "8484:8080" depends_on: postgres_keycloak: condition: service_healthy