Local Deployment Guide
This guide covers deploying VerityNgn locally using Docker Compose for both development and testing.Overview
Local deployment runs:- API Backend: Handles video processing and verification
- Streamlit UI: User-friendly web interface
- Shared Volumes: For data persistence
Prerequisites
Required
- Docker (version 20.10+)
- Docker Compose (version 2.0+)
- 8GB+ RAM recommended
- 10GB+ free disk space
API Keys
You’ll need:- Google Cloud Service Account with Vertex AI access
- Google Search API Key for evidence gathering
- Custom Search Engine (CSE) ID
docs/guides/AUTHENTICATION.md for setup instructions.
Quick Start
1. Clone Repository
2. Configure Environment
Create.env file from the example:
.env and add your credentials:
3. Add Service Account
Place your Google Cloud service account JSON file in the project root:4. Start Services
- Build the API and UI Docker images
- Start both services
- Create shared volumes for data persistence
5. Access Application
- Streamlit UI: http://localhost:8501
- API Backend: http://localhost:8080
- API Health: http://localhost:8080/health
Usage
Submit a Video
- Open http://localhost:8501
- Navigate to ”🎬 Video Input” tab
- Enter a YouTube URL
- Click “Start Verification”
- Monitor progress in “⚙️ Processing” tab
- View results in ”📊 Reports” tab
View Reports
Reports are saved to:- Local directory:
./outputs/\{video_id\}/ - Formats: HTML, JSON, Markdown
- HTML: http://localhost:8080/api/v1/reports/\{video_id\}/report.html
- JSON: http://localhost:8080/api/v1/reports/\{video_id\}/report.json
Common Commands
Start Services
View Logs
Stop Services
Rebuild Images
If you’ve made code changes:Directory Structure
Configuration
Environment Variables
Key variables in.env:
| Variable | Description | Default |
|---|---|---|
GOOGLE_APPLICATION_CREDENTIALS | Path to service account JSON | Required |
GOOGLE_CLOUD_PROJECT | GCP project ID | Required |
GOOGLE_SEARCH_API_KEY | Google Search API key | Required |
CSE_ID | Custom Search Engine ID | Required |
VERTEX_MODEL_NAME | Vertex AI model | gemini-2.0-flash-exp |
MAX_OUTPUT_TOKENS_2_5_FLASH | Max tokens for responses | 16384 |
DEPLOYMENT_MODE | Deployment environment | container |
Port Configuration
To change default ports, editdocker-compose.yml:
Troubleshooting
API Not Accessible
Problem: UI shows “API is not accessible” Solutions:-
Check if API container is running:
-
Check API health:
-
View API logs:
-
Verify network connectivity:
Permission Errors
Problem: “Permission denied” when accessing files Solutions:-
Check file permissions:
-
Fix permissions:
-
Check Docker volume permissions:
Out of Memory
Problem: Container killed due to OOM Solutions:- Increase Docker memory limit (Docker Desktop → Settings → Resources)
- Reduce token limits in
.env:
Service Won’t Start
Problem: Container exits immediately Solutions:-
Check logs:
-
Verify environment variables:
-
Test service account:
Development Workflow
Hot Reloading
For development with live code updates:-
Create
docker-compose.override.yml: -
Restart services:
Running Tests
Accessing Container Shell
Performance Tuning
Resource Limits
Editdocker-compose.yml:
Parallel Processing
For multiple videos:Next Steps
- Production Deployment: See DEPLOYMENT_CLOUD_RUN.md
- Colab Usage: See DEPLOYMENT_COLAB.md
- API Reference: See api/README.md
- Troubleshooting: See TROUBLESHOOTING.md
Support
- Issues: https://github.com/hotchilianalytics/verityngn-oss/issues
- Discussions: https://github.com/hotchilianalytics/verityngn-oss/discussions
- Documentation:
docs/directory
Last Updated: November 4, 2025
Version: 2.3.0
