Docker Setup Guide
🚀 Quick Setup (5 Minutes)
Section titled “🚀 Quick Setup (5 Minutes)”One Command Deployment
Section titled “One Command Deployment”# Clone and deploy everythinggit clone <repository-url>cd govopmake setup-epc-complete
What this does:
- ✅ Generates SSL certificates - Bank-grade security automatically
- ✅ Starts all services - VoP API, database, web interface
- ✅ Loads test data - 131+ test cases ready to use
- ✅ Validates setup - Confirms everything works
Access your service:
- 🌐 VoP API: https://localhost:8443
- 🧪 Test Interface: https://localhost:8443/test
- 📊 Health Check: https://localhost:8443/health
What You Get
Section titled “What You Get”🏗️ Complete Infrastructure
Section titled “🏗️ Complete Infrastructure”Internet → NGINX → VoP API → PostgreSQL ↓ ↓ ↓ ↓ SSL Reverse Secure Encrypted Proxy API Database
📦 Docker Services
Section titled “📦 Docker Services”- VoP API Service - Main verification service
- PostgreSQL - Encrypted database storage
- Redis - High-speed caching
- NGINX - SSL termination and load balancing
🔒 Security Features
Section titled “🔒 Security Features”- TLS 1.3+ encryption for all communications
- Client certificate authentication (mTLS)
- Encrypted database connections
- Secure certificate management
Testing Your Setup
Section titled “Testing Your Setup”✅ 1. Check Service Health
Section titled “✅ 1. Check Service Health”curl -k https://localhost:8443/health
Expected: {"status": "healthy"}
✅ 2. Test Verification
Section titled “✅ 2. Test Verification”curl -X POST https://localhost:8443/api/v1/verify \ --cert certs/client/client.crt \ --key certs/client/client.key \ -H "Content-Type: application/json" \ -d '{ "iban": "DE89370400440532013000", "name": "John Smith" }'
Expected: {"result": "MATCH", "confidence": "HIGH"}
✅ 3. Use Web Interface
Section titled “✅ 3. Use Web Interface”Visit: https://localhost:8443/test
- Enter test IBAN and name
- Click “Verify”
- See instant results
Environment Options
Section titled “Environment Options”🧪 Development Mode
Section titled “🧪 Development Mode”# For development with hot reloadmake dev-epc-https
- Features: Code hot reload, debug logging, relaxed security
- Use for: Local development and testing
🏭 Production Mode
Section titled “🏭 Production Mode”# For production deploymentmake start-production
- Features: Full security, monitoring, performance optimization
- Use for: Live production environments
Common Commands
Section titled “Common Commands”Service Management
Section titled “Service Management”# Start servicesmake start-epc-https
# Stop servicesmake stop-epc
# Restart servicesmake restart-epc
# Check statusmake epc-status
Certificate Management
Section titled “Certificate Management”# Generate new certificatesmake generate-docker-certs
# View certificate detailsopenssl x509 -in certs/server/server.crt -text -noout
Monitoring
Section titled “Monitoring”# View all logsmake logs-epc
# View specific service logsdocker-compose logs vop-servicedocker-compose logs postgresdocker-compose logs nginx
# Check resource usagedocker stats
Configuration Files
Section titled “Configuration Files”Docker Compose Structure
Section titled “Docker Compose Structure”services: vop-service: # Main API service ports: ["8443:8443"]
postgres: # Database with SSL ports: ["5432:5432"]
redis: # Cache with TLS ports: ["6379:6379"]
nginx: # Reverse proxy ports: ["443:443", "80:80"]
Certificate Structure
Section titled “Certificate Structure”certs/├── ca/ # Certificate Authority├── server/ # Server certificates├── client/ # Client certificates├── postgres/ # Database SSL└── redis/ # Cache TLS
Troubleshooting
Section titled “Troubleshooting”🚫 Service Won’t Start
Section titled “🚫 Service Won’t Start”# Check what's runningdocker ps
# Check logs for errorsmake logs-epc
# Clean and restartmake clean-epcmake setup-epc-complete
🔐 Certificate Errors
Section titled “🔐 Certificate Errors”# Regenerate all certificatesmake generate-docker-certs
# Verify certificate is validcurl -k https://localhost:8443/health
🗄️ Database Issues
Section titled “🗄️ Database Issues”# Check database connectionmake db-stats
# Reset database (WARNING: deletes all data)make reset-db
🌐 Connection Problems
Section titled “🌐 Connection Problems”# Test internal connectivitydocker exec govop_vop-service_1 curl -k https://localhost:8443/health
# Check network configurationdocker network ls
Performance & Scaling
Section titled “Performance & Scaling”Expected Performance
Section titled “Expected Performance”- Response time: < 500ms average
- Throughput: 1,000-10,000 requests/day
- Resource usage: 2-4 GB RAM, 2-4 CPU cores
- Uptime: 99.5% with monitoring
Scaling Options
Section titled “Scaling Options”# Scale VoP service to 3 instancesservices: vop-service: deploy: replicas: 3
Backup & Recovery
Section titled “Backup & Recovery”Backup Everything
Section titled “Backup Everything”# Complete backupmake backup-complete
# Database onlymake backup-database
# Certificates onlymake backup-certificates
Recovery
Section titled “Recovery”# Restore from backupmake restore-complete
# Reset to clean statemake clean-epcmake setup-ecp-complete