services:
  aipp-backtester-server:
    image: ${AIPP_IMAGE:-ghcr.io/sergio12s/aipp-backtester-server:latest}
    restart: unless-stopped
    init: true
    ports:
      # Localhost-only by default. Put nginx/Caddy with TLS in front if exposing remotely.
      - "${RLXBT_PUBLISH_HOST:-127.0.0.1}:${RLXBT_PORT:-8142}:8142"
    environment:
      # Optional bearer key if exposing beyond localhost. No license key required.
      RLXBT_API_KEY: ${RLXBT_API_KEY:-}
      RLXBT_BIND_HOST: 0.0.0.0
      RLXBT_GBRAIN: ${RLXBT_GBRAIN:-off}
    volumes:
      - aipp-data:/var/lib/rlxbt
      - aipp-cache:/var/cache/rlxbt
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    read_only: true
    tmpfs:
      - /tmp:size=64m,mode=1777

volumes:
  aipp-data:
  aipp-cache:
