version: '3.8'

services:
  butler:
    build: .
    ports:
      - "9600:9600"
    volumes:
      - ./data:/app/data
      - ./config.yaml:/app/config.yaml:ro
    environment:
      - BUTLER_ALLOWED_USERS=${BUTLER_ALLOWED_USERS:-}
      - NAPCAT_WS_URL=${NAPCAT_WS_URL:-ws://napcat:3001}
      - NAPCAT_TOKEN=${NAPCAT_TOKEN:-}
      - INNGEST_EVENT_KEY=${INNGEST_EVENT_KEY:-dev_key}
      - INNGEST_SIGNING_KEY=${INNGEST_SIGNING_KEY:-}
    depends_on:
      - inngest
    restart: unless-stopped

  inngest:
    image: inngest/inngest:latest
    ports:
      - "8288:8288"
    command: start --url http://butler:8000/api/inngest
    restart: unless-stopped

  napcat:
    image: mlikiowa/napcat-docker:latest
    ports:
      - "3001:3001"
    volumes:
      - ./napcat-data:/app/napcat/config
    restart: unless-stopped
