services:
  max_bot:
    build: .
    container_name: max_bot
    restart: always
    network_mode: host
    volumes:
      - ../config.php:/var/www/html/config.php:ro
      - ./logs:/app/logs
    env_file:
      - .env
    environment:
      - BOT_DATABASE_URL=${BOT_DATABASE_URL:-postgresql+asyncpg://aegisone:aegisone_pass@localhost:5432/aegisone}
      - BOT_MAX_TOKEN=${BOT_MAX_TOKEN:-f9LHodD0cOKkk03DYXj906MdIeRs3HdDo0BC5H2fLMVCMz3PA_Vx4aJqt2l2qPLM5zd5EQ1Zh6APxzpw2UYE}
      - BOT_WEBHOOK_URL=${BOT_WEBHOOK_URL:-https://max.aegisone.ru/webhook}
      - BOT_WEBHOOK_SECRET=${BOT_WEBHOOK_SECRET:-aegisone_bot_secret_2026}
      - BOT_CONFIG_PHP_PATH=${BOT_CONFIG_PHP_PATH:-/var/www/html/config.php}
      - BOT_PHP_SENDMAIL_PATH=${BOT_PHP_SENDMAIL_PATH:-/usr/sbin/sendmail}
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"
