name: asaditools   # Lock project name — prevents runner workspace from overriding it

services:
  asadi-tools:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: asadi-tools
    restart: unless-stopped
    ports:
      - "4310:4310"
    volumes:
      # SQLite database persisted on host
      - asadi_data:/app/data
    environment:
      - ASPNETCORE_ENVIRONMENT=Production
      - ConnectionStrings__Default=Data Source=/app/data/asadi.db
    healthcheck:
      test: ["CMD-SHELL", "curl -f http://localhost:4310/ || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 15s

volumes:
  asadi_data:
    # Stores both asadi.db (SQLite) and keys/ (DataProtection) under /app/data
    driver: local
