Lime will utilize a containerized deployment strategy for consistency across environments.
- Web Tier: Stateless Django instances running via Gunicorn, deployed on an auto-scaling Platform as a Service (e.g., Render, Heroku) or AWS ECS.
- Worker Tier: Persistent Celery worker compute nodes, scaled dynamically based on queue length.
- Data Tier:
- Managed PostgreSQL instance (e.g., Amazon RDS or Supabase) for primary data.
- Managed Redis (e.g., ElastiCache) for Celery task brokering and simple caching.
- Local (Dev): Entire stack runs via a single
docker-compose upcommand, spinning up Postgres, Redis, Django, and Vite. - Staging: A mirror of production with sanitized data. Used by QA and stakeholders to sign off on features before release.
- Production: High-availability, multi-AZ deployment with strict network isolation.
Tool: GitHub Actions
- Linting: Run
flake8andblackon backend code. - Unit Tests: Spin up ephemeral Postgres via GitHub Actions services, run
pytest. - Build: Build frontend static assets via Vite.
- Run CI suite again to ensure merge stability.
- Build Docker images for production.
- Push images to Container Registry.
- Trigger rolling restart on Web and Worker tiers via deployment webhooks.
- Automatically run Django migrations.