version: "3.9"

services:
  telegram-bot:
    build:
      context: .
      dockerfile: Dockerfile
    image: job-seeker-tools:telegram-bot
    container_name: job-seeker-telegram-bot
    env_file:
      - .env
    environment:
      # Required - token must be set (either here or via .env)
      TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
      # Optional access control lists (comma-separated user IDs)
      TELEGRAM_ALLOWED_USER_IDS: ${TELEGRAM_ALLOWED_USER_IDS:-}
      TELEGRAM_ADMIN_IDS: ${TELEGRAM_ADMIN_IDS:-}
      # Ensure data paths inside container
      APPCONFIG__DATA_ROOT: /app/data
      APPCONFIG__SQLITE_PATH: /app/data/meta/sessions.db
      APPCONFIG__LOCK_DIR: /app/data/locks
    volumes:
      - ./data:/app/data
    restart: unless-stopped
    # No ports to expose; bot initiates outbound HTTPS connections only.