- Add comprehensive VERCEL_CLEANUP.md guide with step-by-step cleanup instructions - Enhance deployment.md with detailed protection mechanisms and alternatives - Add troubleshooting section and security considerations - Include Docker, static export, and other deployment platform options - Cross-reference cleanup guide from main deployment documentation Addresses comment #3029277293 requesting documentation validation
7.7 KiB
Deployment Guide
⚠️ Vercel Deployment Warning
IMPORTANT: The Next.js applications in this repository (apps/web-evals and apps/web-roo-code) are configured to prevent accidental Vercel deployments.
Vercel Prevention Measures
- Automatic Vercel Monitoring Disabled: Both applications have
automaticVercelMonitors: falsein their Next.js configuration - Vercel Ignore Files:
.vercelignorefiles are present in both applications to prevent deployment - Manual Override Required: If you need to deploy to Vercel, you must manually remove these protections
Why These Protections Exist
- Prevents accidental deployments during development
- Avoids unintended resource usage on Vercel
- Ensures intentional deployment decisions
- Protects against misconfigured CI/CD pipelines
- Maintains control over deployment environments
- Prevents unauthorized or unmonitored deployments
Vercel Cleanup and Disconnection
If you previously had Vercel deployments and need to clean them up, see the comprehensive guide:
📖 Vercel Cleanup Guide - Step-by-step instructions for safely disconnecting and cleaning up existing Vercel deployments.
If You Need to Deploy to Vercel
⚠️ Warning: Only proceed if you have explicit approval and understand the implications.
If you intentionally want to deploy to Vercel, you must:
-
Remove Protection Files:
# Remove .vercelignore files rm apps/web-evals/.vercelignore rm apps/web-roo-code/.vercelignore -
Update Next.js Configuration:
- Remove
automaticVercelMonitors: falsefromapps/web-evals/next.config.ts - Remove
automaticVercelMonitors: falsefromapps/web-roo-code/next.config.ts
- Remove
-
Configure Vercel Project Settings:
- Set up proper environment variables
- Configure build and deployment settings
- Set up custom domains if needed
-
Test Thoroughly:
- Verify the deployment works as expected
- Test all functionality in the deployed environment
- Monitor resource usage and costs
Alternative Deployment Options
Consider these recommended alternatives for deploying the Next.js applications:
🐳 Docker Deployment
Both applications can be containerized and deployed to any container platform:
# Build Docker image
docker build -t roo-code-app .
# Run locally
docker run -p 3000:3000 roo-code-app
# Deploy to container platforms
# - AWS ECS/Fargate
# - Google Cloud Run
# - Azure Container Instances
# - DigitalOcean App Platform
📦 Static Export
Configure Next.js for static export if your app supports it:
# Add to next.config.ts
const nextConfig = {
output: 'export',
trailingSlash: true,
images: { unoptimized: true }
}
# Build and export
npm run build
🌐 Other Hosting Platforms
- Netlify: Excellent for static sites and JAMstack applications
- Railway: Simple deployment with Git integration and databases
- DigitalOcean App Platform: Managed container deployment
- AWS Amplify: Full-stack deployment with AWS integration
- Cloudflare Pages: Fast global deployment with edge computing
🏠 Self-hosted Options
- Traditional VPS: Deploy to your own virtual private server
- Kubernetes: For scalable container orchestration
- PM2: Process manager for Node.js applications
Application-Specific Notes
web-evals
- Location:
apps/web-evals/ - Purpose: Next.js application for evaluation management
- Vercel Protections:
.vercelignorefile (ignores all files:*)automaticVercelMonitors: falsein Next.js config
- Dependencies: Requires database connection and evaluation services
- Recommended Deployment: Docker with database container
web-roo-code
- Location:
apps/web-roo-code/ - Purpose: Next.js application for the main website
- Vercel Protections:
.vercelignorefile (ignores all files:*)automaticVercelMonitors: falsein Next.js config
- Special Features:
- Production domain redirects (www → non-www, HTTP → HTTPS)
- Custom redirect configuration in
next.config.ts
- Recommended Deployment: Static export or Docker for dynamic features
Protection Mechanism Details
How .vercelignore Works
The .vercelignore file contains a single * wildcard that tells Vercel to ignore all files in the project, effectively preventing any deployment.
How automaticVercelMonitors Works
Setting automaticVercelMonitors: false in the Next.js configuration disables Vercel's automatic monitoring features, which can trigger deployments.
Bypassing Protections (Advanced)
If you need to temporarily bypass protections for testing:
# Temporarily rename protection files
mv apps/web-evals/.vercelignore apps/web-evals/.vercelignore.bak
mv apps/web-roo-code/.vercelignore apps/web-roo-code/.vercelignore.bak
# Deploy to Vercel
vercel --prod
# Restore protections
mv apps/web-evals/.vercelignore.bak apps/web-evals/.vercelignore
mv apps/web-roo-code/.vercelignore.bak apps/web-roo-code/.vercelignore
Development
For local development, these protections do not affect your workflow:
# Install dependencies
npm install
# Start development servers
cd apps/web-evals && npm run dev # Usually runs on :3000
cd apps/web-roo-code && npm run dev # Usually runs on :3001
# Run both applications simultaneously
npm run dev # If workspace script is configured
Development Environment Setup
-
Prerequisites:
- Node.js 18+
- npm or pnpm
- Git
-
Environment Variables:
- Copy
.env.exampleto.env.localin each app directory - Configure required environment variables
- Never commit
.env.localfiles
- Copy
-
Database Setup (for web-evals):
- Set up local database or use development database
- Run migrations if applicable
- Seed test data if needed
Monitoring and Maintenance
Regular Checks
- Verify protection files are still in place
- Monitor for accidental Vercel project creation
- Review deployment logs and costs
- Update alternative deployment configurations
Security Considerations
- Regularly rotate API keys and secrets
- Monitor access logs for unauthorized deployment attempts
- Keep deployment documentation up to date
- Review team access to deployment platforms
Troubleshooting
Common Issues
Problem: Vercel deployment still occurs despite protections Solution:
- Verify
.vercelignorecontains* - Check
automaticVercelMonitors: falseis in config - Remove any existing Vercel projects (see VERCEL_CLEANUP.md)
Problem: Local development not working Solution:
- Run
npm installin project root and app directories - Check Node.js version compatibility
- Verify environment variables are set correctly
Problem: Alternative deployment failing Solution:
- Check platform-specific requirements
- Verify build process works locally
- Review deployment logs for specific errors
Questions and Support
If you have questions about deployment or need to modify these protections:
- First: Review this documentation and the Vercel Cleanup Guide
- Development Team: Consult with the development team before making changes
- Security Team: For security-related deployment questions
- DevOps Team: For infrastructure and deployment platform questions
Emergency Contacts
For urgent deployment issues:
- Check the project's README for current contact information
- Use the project's communication channels (Slack, Discord, etc.)
- Create an issue in the repository with the
deploymentlabel
Last Updated: January 2025 Version: 1.0 Maintainer: Development Team