version: '3.1'

services:
  service-authentication:
    build: .
    image: registry.forge.grandlyon.com/web-et-numerique/web-et-numerique-internet/data.grandlyon.com/web-portal/components/services/authentication:${TAG}
    ports:
      - ${AUTHENTICATION_API_BIND_PORT}:3000
    environment:
      # - POST_LOGOUT_REDIRECT_URI=${POST_LOGOUT_REDIRECT_URI}
      # - REDIRECT_URI=${REDIRECT_URI}
      # - OIDC_DISCOVERY_URL=${OIDC_DISCOVERY_URL}
      # - OIDC_CLIENT_ID=${OIDC_CLIENT_ID}
      # - OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET}
      # - GLC_DISCOVERY_URL=${GLC_DISCOVERY_URL}
      # - GLC_CLIENT_ID=${GLC_CLIENT_ID}
      # - GLC_CLIENT_SECRET=${GLC_CLIENT_SECRET}
      - LEGACY_MIDDLEWARE_URL=${LEGACY_MIDDLEWARE_URL}
      - COOKIE_DOMAIN=${COOKIE_DOMAIN}
      - ACCESS_TOKEN_COOKIE_KEY=${ACCESS_TOKEN_COOKIE_KEY}
      - KONG_URL=${KONG_URL}
      - JWT_LIFETIME=${JWT_LIFETIME} # in seconds
    restart: unless-stopped 
    # depends_on:
    #   - redis
        
#   redis:
#     image: redis:5.0.0-alpine
#     command: ["redis-server", "--appendonly", "yes"]
#     hostname: redis
#     volumes:
#       - redis-data:/data
#     restart: unless-stopped 

# volumes:
#   redis-data:


