# Configuration for pocket-id setup
name: big-bear-pocketid
# Service definitions for the pocket-id application
services:
  # Service configuration for the pocket-id application
  big-bear-pocketid:
    container_name: big-bear-pocketid # Name of the pocket-id container
    image: ghcr.io/pocket-id/pocket-id:v2.7 # Docker image to use for pocket-id
    restart: unless-stopped # Restart policy: Restart unless manually stopped
    cpu_shares: 90
    deploy:
      resources:
        limits:
          memory: 2048M
    environment:
      - APP_URL=http://localhost:1411 # Application URL for pocket-id, should be set to your domain name e.g https://pocketid.example.com if using a reverse proxy
      - TRUST_PROXY=false # Whether to trust proxy headers, set to true if behind a reverse proxy
      - MAXMIND_LICENSE_KEY= # MaxMind license key for geolocation, optional
      - PUID=1000 # User ID for file permissions
      - PGID=1000 # Group ID for file permissions
    hostname: big-bear-pocketid
    labels:
      icon: https://pocket-id.org/img/logo.png # Icon URL
    ports:
      - target: 1411
        published: "1411"
        protocol: tcp # Port mapping between host and container
    volumes:
      - /DATA/AppData/$AppID/data:/app/data
    network_mode: bridge
    privileged: false
    # Optional healthcheck
    healthcheck:
      test: "curl -f http://localhost:1411/healthz" # Health check command
      interval: 1m30s
      timeout: 5s
      retries: 2
      start_period: 10s
    x-casaos:
      envs:
        - container: APP_URL
          description:
            en_us: 'Container Variable: APP_URL'
        - container: TRUST_PROXY
          description:
            en_us: 'Container Variable: TRUST_PROXY'
        - container: MAXMIND_LICENSE_KEY
          description:
            en_us: 'Container Variable: MAXMIND_LICENSE_KEY'
        - container: PUID
          description:
            en_us: 'Container Variable: PUID'
        - container: PGID
          description:
            en_us: 'Container Variable: PGID'
      volumes:
        - container: /app/data
          description:
            en_us: 'Container Path: /app/data'
      ports:
        - container: "1411"
          description:
            en_us: 'Container Port: 1411'
x-casaos:
  # Supported CPU architectures for this application
  architectures:
    - amd64
    - arm64
  # Main service for this application
  main: big-bear-pocketid
  # Detailed description for the application
  description:
    en_us: Simple and easy-to-use OIDC provider that allows users to authenticate with their passkeys to your services.
  # Brief tagline for the application
  tagline:
    en_us: Passkey-based OIDC authentication
  # Developer's information
  developer: pocket-id
  # Author of this particular configuration
  author: techieanant
  # Icon URL for the application
  icon: https://pocket-id.org/img/logo.png
  # Thumbnail image for the application (if any)
  thumbnail: ""
  # Installation tips
  tips:
    before_install:
      en_us: |
        Before you install read this: https://community.bigbeartechworld.com/t/added-pocket-id-to-bigbearcasaos/3552#p-6013-documentation-4
  # Title for the application
  title:
    en_us: Pocket ID
  # Category under which the application falls
  category: BigBearCasaOS
  # Default port mapping for the application
  port_map: "1411"
