Staging Environment Guide¶
Overview¶
The staging environment is a production-like environment for testing changes before deploying to production.
Configuration¶
Located in: deploy/docker-compose.staging.yml
Services¶
- PostgreSQL: Port 5433
- Redis: Port 6380
- API Server: Port 8001
- Celery Worker: Background tasks
Setup¶
-
Create environment file:
-
Start staging environment:
-
Run migrations:
Deployment¶
Use the automated deployment script:
This script will: - Pull latest code - Build new images - Run migrations - Restart services - Perform health checks
Testing¶
- API: http://localhost:8001
- Health: http://localhost:8001/health/
- Metrics: http://localhost:8001/metrics
Differences from Production¶
- Debug mode enabled
- Relaxed security settings
- Separate database and ports
- No SSL/TLS required
Troubleshooting¶
Check logs:
Restart services:
Version History¶
- 1.0.0 (2025-01-27): Initial staging environment setup