CONFIDENTIAL A&R INFRASTRUCTURE โ 2026 DEPLOYMENT
Consolidated Production Package (Phases 1โ5 Complete)
PREDATOR_PRODUCTION contains the complete, battle-tested codebase for Agent PREDATOR and its Swarm. It ingests raw platform data from YouTube, Spotify, Shazam, and SoundCloud, calculates algorithmic velocity and comment density, enforces zero-bloat database maintenance, and routes high-priority viral trends directly to ClickUp.
Deploying with Docker is the fastest, cleanest method for Hetzner or any bare-metal Ubuntu Linux server.
- Docker Engine installed (
docker --version) - Docker Compose installed (
docker-compose --version)
-
Clone/Copy Project: Upload
PREDATOR_PRODUCTIONto your server directory (e.g.,/opt/predator). -
Configure Environment Variables: Copy
.env.exampleto.env:cp .env.example .env
Edit
.envto include your actual API keys and Webhook URLs:CLICKUP_API_KEY=pk_your_actual_clickup_api_key CLICKUP_LIST_ID=your_list_id CLICKUP_USER_ID_AYDEN=81352468 DISCORD_LOGS_WEBHOOK_URL=https://discord.com/api/webhooks/... DISCORD_FATAL_WEBHOOK_URL=https://discord.com/api/webhooks/...
-
Initialize Database Tables:
docker-compose run --rm predator_swarm python -m src.main --init-db
-
Launch the Swarm in Daemon Mode:
docker-compose up -d
-
Check Container Logs:
docker-compose logs -f predator_swarm
To run natively on Hetzner Ubuntu bare-metal:
-
Install System Dependencies:
sudo apt update && sudo apt install -y python3-pip python3-venv postgresql redis-server git -
Setup Virtual Environment & Dependencies:
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt python3 -m playwright install chromium python3 -m playwright install-deps chromium -
Initialize Database & Verify Environment:
python3 -m src.main --init-db python3 -m src.main --mock-validation-phase5
-
Create Systemd Service (
/etc/systemd/system/predator.service):[Unit] Description=Project Predator Swarm Daemon After=network.target postgresql.service redis-server.service [Service] Type=simple User=ubuntu WorkingDirectory=/opt/predator ExecStart=/opt/predator/.venv/bin/python -m src.main --daemon Restart=always RestartSec=10 [Install] WantedBy=multi-user.target
-
Enable and Start Service:
sudo systemctl daemon-reload sudo systemctl enable predator sudo systemctl start predator sudo systemctl status predator
You can run individual CLI operations or admin overrides at any time:
- Add VIP Channel:
python -m src.main --admin-cmd "/vip add https://www.youtube.com/channel/UC_channel_id" - Inject Search Keyword:
python -m src.main --admin-cmd "/addkeyword hardstyle sped up"
- Run External Chart Sweep:
python -m src.main --sweep-charts - Process YouTube Search Queue:
python -m src.main --process-queue - Process 12H Hunts & Early Kills:
python -m src.main --process-hunts - Run ClickUp Task Drip Feed:
python -m src.main --drip-feed
To verify full pipeline integrity in production:
python -m src.main --mock-validation-fullOr run the complete Pytest test suite:
pytest tests/test_full_suite.py -vPREDATOR_PRODUCTION/
โโโ docker-compose.yml # Production Docker orchestration (DB, Redis, App)
โโโ Dockerfile # Production container image manifest
โโโ .env.example # Environment template
โโโ requirements.txt # Consolidated Python requirements
โโโ README.md # Hosting & ops manual
โโโ src/
โ โโโ main.py # CLI & Daemon Orchestrator
โ โโโ scoring.py # 0-100 Predator Score Engine
โ โโโ trend_logic.py # Title Clustering & Format Counter-Strike
โ โโโ health_monitor.py # Fatal Alert Monitors & Hardware Ceiling
โ โโโ admin_commands.py # /vip add & /addkeyword Injections
โ โโโ database_maintenance.py # 30-Day TTL Purge & Zero-Bloat Cleanup
โ โโโ phase2_staging.py # Self-learning dataset exporter
โ โโโ redis_queue.py # Redis drip-feed & DB fallback queue
โ โโโ clickup.py # ClickUp API, @mentions, Google Trends
โ โโโ discord_alerts.py # #swarm-logs & #swarm-fatal webhooks
โ โโโ youtube_tracker.py # Individual video metric scraper
โ โโโ scrapers.py # Spotify, Shazam, Beatport, Apple, YouTube Trending scrapers
โ โโโ normalizer.py # Base title extraction & Unicode text normalizer
โ โโโ database.py # PostgreSQL / SQLite DB connection & migrations
โโโ tests/
โโโ test_full_suite.py # Full test suite covering all 5 phases