perf: Separate scheduler + harden deploy sync

This commit is contained in:
2025-12-21 15:44:35 +01:00
parent f17206b2f4
commit fd2625a34d
2 changed files with 12 additions and 3 deletions

View File

@ -28,6 +28,10 @@ jobs:
rsync -az --delete \ rsync -az --delete \
-e "ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=yes" \ -e "ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=yes" \
--exclude ".git" \ --exclude ".git" \
--exclude ".venv" \
--exclude "venv" \
--exclude "backend/.venv" \
--exclude "backend/venv" \
--exclude "frontend/node_modules" \ --exclude "frontend/node_modules" \
--exclude "frontend/.next" \ --exclude "frontend/.next" \
--exclude "**/__pycache__" \ --exclude "**/__pycache__" \
@ -54,7 +58,9 @@ jobs:
env = { env = {
# Core # Core
"ENVIRONMENT": "production", "ENVIRONMENT": "production",
"ENABLE_SCHEDULER": "true", # Scheduler will run in separate container (pounce-scheduler)
"ENABLE_SCHEDULER": "false",
"DEBUG": "false",
"COOKIE_SECURE": "true", "COOKIE_SECURE": "true",
"CORS_ORIGINS": "https://pounce.ch,https://www.pounce.ch", "CORS_ORIGINS": "https://pounce.ch,https://www.pounce.ch",
"SITE_URL": "https://pounce.ch", "SITE_URL": "https://pounce.ch",
@ -68,6 +74,8 @@ jobs:
# DB/Redis # DB/Redis
"DATABASE_URL": os.environ["DATABASE_URL"], "DATABASE_URL": os.environ["DATABASE_URL"],
"REDIS_URL": "redis://pounce-redis:6379/0", "REDIS_URL": "redis://pounce-redis:6379/0",
# Rate limiting must be shared across workers in production
"RATE_LIMIT_STORAGE_URI": "redis://pounce-redis:6379/2",
# Auth # Auth
"SECRET_KEY": os.environ["SECRET_KEY"], "SECRET_KEY": os.environ["SECRET_KEY"],

View File

@ -11,8 +11,9 @@ services:
- pounce-network - pounce-network
- supabase-network - supabase-network
environment: environment:
- DATABASE_URL=postgresql+asyncpg://pounce:PounceDB2024!@supabase-db-n0488s44osgoow4wgo04ogg0:5432/pounce # NOTE: Do NOT hardcode credentials in git.
- JWT_SECRET=${JWT_SECRET:-pounce-super-secret-jwt-key-2024-production} - DATABASE_URL=${DATABASE_URL}
- JWT_SECRET=${JWT_SECRET}
- FRONTEND_URL=http://pounce.185-142-213-170.sslip.io - FRONTEND_URL=http://pounce.185-142-213-170.sslip.io
- ENVIRONMENT=production - ENVIRONMENT=production
- ENABLE_SCHEDULER=true - ENABLE_SCHEDULER=true