paperclip-hub / rules
lacymorrow/paperclip-hub/.cursor/rules/deployment.mdc
Deployment Best Practices and Guidelines
Cursor rule15 starsChanged 7 months ago
- Reads credentials
What's in it
- Deployment Best Practices
- Multi-Zone Deployment
- Zone Deployment Strategy
- Zone Environment Configuration
- Zone-Specific Optimizations
- Environment Setup
- Docker Configuration
- CI/CD Pipeline
- Production Deployment
- Infrastructure
- Security
- Monitoring
- Scaling
- Backup and Recovery
- Documentation
--- description: Deployment Best Practices and Guidelines globs: Dockerfile, docker-compose.yml, .env.*, .github/workflows/*, vercel.json alwaysApply: false --- # Deployment Best Practices ## Multi-Zone Deployment ### Zone Deployment Strategy - Deploy each zone as separate Vercel project - Use consistent naming: `main-shipkit`, `docs-shipkit`, `blog-shipkit`, `ui-shipkit`, `tools-shipkit` - Configure environment variables pointing to zone URLs - Assign custom domain to main application - Test cross-zone navigation and functionality ### Zone Environment Configuration - Main app contains zone domain environment variables - Each zone has its own environment configuration - Use separate databases or shared database per zone requirements - Configure authentication to work across zones - Set up monitoring for each zone independently ### Zone-Specific Optimizations - Documentation zone: Static generation, search optimization - Blog zone: ISR for posts, SEO optimization - UI zone: Component isolation, visual regression testing - Tools zone: Client-side rendering, real-time features ## Environment Setup - Use `.env.local` for local development - Use `.env.production` for production - Use `.env.test` for testing - Never commit environment files - Document all required variables - Use strong naming conventions - Validate environment variables at startup ## Docker Configuration - Use multi-stage builds - Optimize layer caching - Include only necessary files - Use appropriate base images - Set proper environment variables - Configure health checks - Document all configurations ## CI/CD Pipeline - Automate build process - Run tests before deployment - Check code quality - Scan for vulnerabilities - Use proper caching - Implement proper rollbacks - Monitor deployment status ## Production Deployment - Use proper build optimization - Enable proper caching - Configure proper headers - Set up monitoring - Configure logging - Set up alerts - Plan for scaling ## Infrastructure - Use infrastructure as code - Implement proper monitoring - Set up logging - Configure backups - Plan for disaster recovery - Document architecture - Monitor costs ## Security - Use HTTPS everywhere - Configure proper headers - Implement rate limiting - Set up WAF - Monitor for threats - Regular security audits - Document security measures ## Monitoring - Set up error tracking - Monitor performance - Track user metrics - Set up alerting - Log important events - Monitor resources - Track costs ## Scaling - Plan for horizontal scaling - Configure auto-scaling - Optimize resource usage - Monitor bottlenecks - Plan capacity - Document scaling strategy - Test scaling scenarios ## Backup and Recovery - Regular backups - Test recovery procedures - Document recovery plans - Monitor backup status - Plan for disasters - Regular recovery tests - Document procedures ## Documentation - Document deployment process - Document configuration - Document dependencies - Document troubleshooting - Keep runbooks updated - Document incidents - Maintain change log
More agent context in lacymorrow/paperclip-hub
41 other files this repository gives its agents.
AGENTS.md
CLAUDE.md
Cursor rule
- .cursor/rules/accessibility.mdc
- .cursor/rules/ai.mdc
- .cursor/rules/coding-style.mdc
- .cursor/rules/cursor-rules.mdc
- .cursor/rules/database.mdc
- .cursor/rules/database-patterns.mdc
- .cursor/rules/docker.mdc
- .cursor/rules/documentation-system.mdc
- .cursor/rules/dont-do.mdc
- .cursor/rules/environment.mdc
- .cursor/rules/error-handling.mdc
- .cursor/rules/graceful-degradation.mdc
- .cursor/rules/local-storage-patterns.mdc
- .cursor/rules/multi-zone-architecture.mdc
- .cursor/rules/nextjs.mdc
- .cursor/rules/payload-configuration.mdc
- .cursor/rules/payment-providers.mdc
- .cursor/rules/payments.mdc
- .cursor/rules/performance.mdc
- .cursor/rules/project.mdc
- .cursor/rules/react.mdc
- .cursor/rules/security.mdc
- .cursor/rules/server-actions-patterns.mdc
- .cursor/rules/single-responsibility-principle.mdc
- .cursor/rules/supabase-bootstrap.mdc
- .cursor/rules/supabase-db-create-functions.mdc
- .cursor/rules/supabase-db-create-migrations.mdc
- .cursor/rules/supabase-db-rls.mdc
- .cursor/rules/supabase-db-styleguide.mdc
- .cursor/rules/supabase-edge.mdc
- .cursor/rules/testing.mdc
- .cursor/rules/ui-ux.mdc
- .cursor/rules/vibe-tools.mdc
- .cursor/rules/waitlist-implementation.mdc
- .cursor/rules/webhook-security.mdc
Skill
- react-doctor.agents/react-doctor/SKILL.md
- fix-review.claude/skills/fix-review/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

