Metabind CMS Deployment Guide
Environments
Development
- URL: https://dev.metabind.ai
- API: https://api-dev.metabind.ai
- WebSocket: wss://ws-api-dev.metabind.ai
- CDN: https://cdn-dev.metabind.ai
- Branch:
develop - Deployment: Automatic on merge
Production
- URL: https://www.metabind.ai
- API: https://api.metabind.ai
- WebSocket: wss://ws-api.metabind.ai
- CDN: https://cdn.metabind.ai
- Branch:
main - Deployment: Manual approval required
Deployment Process
Development Deployment (Automatic)
- Create feature branch from
develop - Make changes and test locally
- Create PR to
develop - After review, merge PR
- Automatic deployment to dev.metabind.ai
Production Deployment (Manual Approval)
- Ensure all changes are tested on dev environment
- Create PR from
developtomain - Review changes thoroughly
- Merge PR to
main - GitHub Actions will request manual approval
- Go to Actions tab → Click on the workflow run → Review and approve
- Deployment proceeds to www.metabind.ai
Release Creation (Optional)
For formal releases with version tags:- Go to Actions → “Create Release” workflow
- Click “Run workflow”
- Enter version (e.g.,
v1.0.0) - Check “pre-release” if applicable
- This creates a release branch and draft release
Infrastructure
AWS Resources
- S3 Buckets:
- Dev:
metabind-frontend-dev - Prod:
metabind-frontend-prod
- Dev:
- CloudFront Distributions:
- Dev:
E37V5H2J99LGBJ(dev.metabind.ai) - Prod:
EAMI96CJSLZDO(www.metabind.ai)
- Dev:
- Route53: Managed DNS for both domains
Environment Variables
Environment-specific configs are set during build:VITE_API_URL: API endpointVITE_WS_URL: WebSocket endpointVITE_CDN_URL: CDN endpointVITE_ENV: Environment nameVITE_USER_POOL_ID: Cognito User Pool IDVITE_USER_POOL_CLIENT_ID: Cognito User Pool Client ID
Local Development
Setup
Building Locally
Manual Deployment
Security
GitHub Secrets Required
AWS_ACCESS_KEY_ID: AWS deployment credentialsAWS_SECRET_ACCESS_KEY: AWS deployment credentials
Production Environment Protection
- Requires manual approval from designated reviewers
- Configure in: Settings → Environments → production
Rollback Procedure
Quick Rollback
- Go to GitHub Actions
- Find the last successful deployment
- Click “Re-run all jobs”
- Approve deployment
S3 Versioning Rollback
- Go to AWS S3 Console
- Navigate to the production bucket
- Use “Show versions” to see previous deployments
- Restore previous version if needed
Monitoring
CloudFront Cache
- Invalidations happen automatically on deploy
- Manual invalidation:
aws cloudfront create-invalidation --distribution-id EAMI96CJSLZDO --paths '/*'
Deployment Status
- Check GitHub Actions for deployment logs
- CloudFront distribution status in AWS Console
- Test endpoints after deployment
Team Workflow
Feature Development
- Create feature branch from
develop - Implement and test locally
- Create PR to
develop - Code review by team
- Merge triggers auto-deploy to dev
Production Release
- Test thoroughly on dev environment
- Create release PR from
developtomain - Team reviews release notes
- Merge PR (doesn’t auto-deploy)
- Designated approver triggers production deployment
- Verify production deployment
Important Notes
- Never commit
.env.localor any file with secrets - Always test on dev before releasing to prod
- CloudFront cache takes ~5-10 minutes to fully propagate
- DNS changes can take up to 48 hours (though usually much faster)
- Production deployments should be done during low-traffic periods
Troubleshooting
Build Failures
- Check Node.js version (should be 20)
- Verify PNPM version matches workflows
- Clear node_modules and pnpm store
Deployment Failures
- Check AWS credentials are valid
- Verify S3 bucket permissions
- Check CloudFront distribution status
Cache Issues
- Force CloudFront invalidation
- Clear browser cache
- Check cache headers in S3
