- Multi-stage Dockerfile (builder+runner, <500MB target) - docker-compose.yml: app(x4) + postgres + redis + prometheus + grafana + nginx - .env.example with all required secrets (never hardcoded) - requirements.txt with all dependencies including prometheus-client, alembic - GitHub Actions CI: lint (flake8+bandit+safety) + tests + Docker build/push - GitHub Actions CD: staging deploy -> smoke tests -> production deploy + rollback - Alembic migration setup + initial PostgreSQL schema (001_initial_schema) - SQLite→PostgreSQL data migration script - Prometheus metrics module (HTTP, ML, DB, business metrics) - Prometheus alert rules (5xx >1%, latency >2s, disk >80%, ML accuracy) - Grafana dashboard (overview: req/s, p95, ML accuracy, error rate) - Nginx reverse proxy config (HTTPS/TLS, rate limiting, security headers) - Structured JSON logging module - Automated daily DB backup script (pg_dump + 30-day retention) Branch: feature/devops-cicd Co-Authored-By: Paperclip <noreply@paperclip.ing>
69 lines
656 B
Plaintext
69 lines
656 B
Plaintext
# Files/dirs excluded from Docker build context
|
|
# Keep image small; sensitive files never baked in
|
|
|
|
# Python artifacts
|
|
__pycache__/
|
|
*.py[cod]
|
|
*.pyo
|
|
*.pyd
|
|
.Python
|
|
*.egg-info/
|
|
dist/
|
|
build/
|
|
.eggs/
|
|
|
|
# Virtual environments
|
|
venv/
|
|
.venv/
|
|
env/
|
|
|
|
# Databases (use volumes)
|
|
*.db
|
|
*.sqlite
|
|
*.sqlite3
|
|
|
|
# ML models (use volumes)
|
|
*.pkl
|
|
*.joblib
|
|
|
|
# Logs
|
|
logs/
|
|
*.log
|
|
|
|
# Git
|
|
.git/
|
|
.gitignore
|
|
|
|
# Backups & temp files
|
|
*.backup*
|
|
*.bak*
|
|
*.tmp
|
|
*.bak
|
|
|
|
# Secrets & env files
|
|
.env
|
|
.env.*
|
|
!.env.example
|
|
|
|
# Exports
|
|
exports/
|
|
|
|
# OS files
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# Editor files
|
|
.vscode/
|
|
.idea/
|
|
*.swp
|
|
*.swo
|
|
|
|
# Test artifacts
|
|
.pytest_cache/
|
|
htmlcov/
|
|
.coverage
|
|
coverage.xml
|
|
|
|
# AWS
|
|
awscliv2.zip
|