Deployment Options
Vercel
One-click deployment with zero configuration
Docker
Containerized deployment for any infrastructure
Self-Hosted
Deploy on your own servers with full control
Deploy to Vercel
Vercel provides the easiest deployment path for Next.js applications.1
Prepare your repository
Ensure your VIJ Admin code is in a Git repository (GitHub, GitLab, or Bitbucket):
2
Connect to Vercel
- Go to vercel.com and sign in
- Click Add New Project
- Import your VIJ Admin repository
- Select the repository and click Import
3
Configure environment variables
In the Vercel project settings, add environment variables:Required Variables:Optional Variables:
4
Deploy
Click Deploy and wait for the build to complete.
Your VIJ Admin dashboard will be live at
https://your-project.vercel.app5
Configure custom domain (optional)
- Go to Settings → Domains
- Add your custom domain (e.g.,
vij.yourdomain.com) - Update DNS records as instructed
- Update
NEXT_PUBLIC_BASE_URLenvironment variable
Vercel Configuration
Createvercel.json for advanced configuration:
vercel.json
Vercel Environment Variables
string
required
MongoDB Atlas connection string.Example:Getting Started with MongoDB Atlas:
- Create free account at mongodb.com/atlas
- Create a cluster (free tier available)
- Add Vercel IP addresses to IP whitelist (or use
0.0.0.0/0for all IPs) - Create database user
- Get connection string
string
required
Your Vercel deployment URL.
Docker Deployment
Deploy VIJ Admin using Docker for consistent, portable deployments.Dockerfile
Create aDockerfile in your project root:
Dockerfile
Docker Compose
Createdocker-compose.yml for local development or deployment:
docker-compose.yml
Build and Run
1
Build Docker image
2
Run with Docker Compose
VIJ Admin will be available at http://localhost:3000
3
View logs
4
Stop services
Production Docker Deployment
For production, use environment-specific compose files:docker-compose.prod.yml
Self-Hosted Deployment
Deploy VIJ Admin on your own infrastructure.Prerequisites
- Node.js 18+ installed
- MongoDB 5.0+ running
- Nginx or Apache for reverse proxy (recommended)
- PM2 or systemd for process management
Deployment Steps
1
Prepare the server
2
Clone and build
3
Start with PM2
VIJ Admin is now running on port 3000
4
Configure Nginx reverse proxy
Create Nginx configuration:Enable site:
/etc/nginx/sites-available/vij-admin
5
Setup SSL with Certbot
Your VIJ Admin is now accessible at
https://vij.yourdomain.comPM2 Configuration
Createecosystem.config.js:
ecosystem.config.js
Systemd Service (Alternative to PM2)
Create systemd service file:/etc/systemd/system/vij-admin.service
Kubernetes Deployment
Deploy VIJ Admin on Kubernetes clusters.Kubernetes Manifests
k8s/deployment.yaml
k8s/secrets.yaml
Post-Deployment
Health Checks
Verify your deployment is healthy:Monitoring
Set up monitoring for your VIJ Admin instance:- Uptime Monitoring
- Application Monitoring
- Database Monitoring
Use services like UptimeRobot or Pingdom:Monitor URL:
https://vij.yourdomain.comCheck interval: 5 minutesAlert on: Status code != 200Backup Strategy
Implement regular backups:backup.sh
Security Considerations
Enable authentication
Enable authentication
Add authentication middleware to protect your VIJ instance:
middleware.ts
Use HTTPS only
Use HTTPS only
Force HTTPS in production:
Restrict MongoDB access
Restrict MongoDB access
- Use MongoDB authentication
- Whitelist IP addresses
- Use SSL/TLS for connections
- Enable audit logging
Environment variable security
Environment variable security
- Never commit
.env.localto version control - Use secret management (AWS Secrets Manager, Vault)
- Rotate API keys regularly
- Use environment-specific keys
.gitignore
Scaling
Horizontal Scaling
VIJ Admin can be horizontally scaled:Database Optimization
For high-traffic deployments:Next Steps
Environment Variables
Complete environment configuration reference
Dashboard Features
Explore all dashboard capabilities
Monitoring
Set up monitoring and analytics
Security
Implement authentication and security