Platform overview
| Platform | Best for | Guide |
|---|---|---|
| VPS (PM2) | Full control, FFmpeg, workers | VPS guide |
| VPS (Docker) | Containers, rollbacks | This page |
| cPanel | Shared hosting | cPanel guide |
| Vercel | Fastest deploy, auto SSL | This page |
| Railway | GitHub deploy + Postgres plugin | This page |
VPS with Docker
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
sudo apt install -y docker-compose-plugin
cd /var/www/voralis-web
cp deploy/env.example .env.production
nano .env.production
bash deploy/install-docker.shOr manually:
docker compose -f docker-compose.prod.yml up -d --buildWith Nginx container (optional):
docker compose -f docker-compose.prod.yml --profile nginx up -d --buildWith video worker + Redis:
docker compose -f docker-compose.prod.yml --profile worker up -d --buildSet REDIS_URL=redis://redis:6379 in .env.production for the worker profile.
Vercel
- Push code to GitHub/GitLab/Bitbucket.
- Import project at vercel.com — root directory:
voralis-web. - Framework preset: Next.js.
- Add all env vars from
deploy/env.example. - Build command:
npm run prisma:generate && npm run build(invercel.json). - Deploy and assign custom domain.
Notes
- Use Neon or external PostgreSQL.
- Set
NEXT_PUBLIC_APP_URLto your Vercel or custom domain. - FFmpeg-heavy features may need external processing on serverless.
- Set
NEXT_STANDALONE=falseif needed for Vercel builds.
Railway
- Create project at railway.app → Deploy from GitHub.
- Set root directory to
voralis-webif in a monorepo. - Railway reads
railway.tomlfor build/start commands. - Add PostgreSQL plugin or set
NEON_DATABASE_URL. - Add all env vars from
deploy/env.example. - Assign custom domain in Railway settings.
Deployment files reference
| File | Purpose |
|---|---|
| Dockerfile | Production image (Node 22 + FFmpeg) |
| docker-compose.prod.yml | Production stack |
| ecosystem.config.cjs | PM2 for VPS/cPanel |
| deploy/install-vps.sh | VPS bare-metal installer |
| deploy/env.example | Environment template |
| DEPLOYMENT.md | Full deployment guide in repo root |
Security checklist (production)
- Strong
JWT_SECRET,NEXTAUTH_SECRET,ENCRYPTION_KEY - HTTPS enabled (Let's Encrypt, AutoSSL, or platform SSL)
.env.productionnever committed to git- Database SSL:
?sslmode=require - Firewall: only 80/443 public; 3000/6379 localhost only
- Regular PostgreSQL backups