
services:
  keycloak:
    # image: quay.io/keycloak/keycloak:23.0.6
    container_name: eglpm_keycloak
    build:
      context: .
      dockerfile: Dockerfile
    environment:
      KC_HOSTNAME: 38.242.223.54
    #   KC_HOSTNAME_PORT: 9092
    #   KC_HOSTNAME_STRICT_BACKCHANNEL: false
    #   KC_HTTP_ENABLED: true
    #   KC_HOSTNAME_STRICT_HTTPS: false
      KC_HEALTH_ENABLED: true
      KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN}
      KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
      KC_DB: postgres
      KC_DB_URL: jdbc:postgresql://postgres/${POSTGRES_EGL_PM_DB}
      KC_DB_USERNAME: ${POSTGRES_USER}
      KC_DB_PASSWORD: ${POSTGRES_PASSWORD}
    #   KC_PROXY_HEADERS: forwarded 
    # command: ["start"]
    # ports:
    #   - 9092:8080
    restart: always
    # depends_on:
    #   - postgres
    networks:
      - egl_pm_network
    # volumes:
    #   - keycloak:/opt/keycloak/data
    
networks:
  egl_pm_network:
    driver: bridge