Skip to main content

Deployment

Backend Deployment

The backend runs on EC2 (t3.small, Ubuntu 22.04) and is deployed via a one-command script.

Deploy Script

./deploy-auto.sh

This script:

  1. Builds TypeScript locally
  2. Rsyncs the build to the EC2 instance
  3. Runs npm install on the server
  4. Restarts the systemd service

SSH Access

ssh -i ~/.ssh/creovine-api-key.pem ubuntu@98.92.255.171

Service Management

# Check status
sudo systemctl status creovine-api

# Restart
sudo systemctl restart creovine-api

# View logs
sudo journalctl -u creovine-api -f

Environment Variables

The .env file lives on the server and is not synced during deployment. New environment variables must be added manually:

ssh -i ~/.ssh/creovine-api-key.pem ubuntu@98.92.255.171
sudo nano /home/ubuntu/creovine-api/.env
sudo systemctl restart creovine-api

Frontend Deployment

The frontend is hosted on Vercel with automatic Git deployments.

Production URL

  • Primary: liraintelligence.com
  • Docs: docs.liraintelligence.com

Deploy

Push to the main branch and Vercel automatically builds and deploys:

git push origin main

Or trigger a manual deploy:

vercel --prod

DNS Configuration

DomainTypeValueHost
liraintelligence.comA76.76.21.21Vercel
www.liraintelligence.comCNAMEcname.vercel-dns.comVercel
docs.liraintelligence.comCNAMEcname.vercel-dns.comVercel
api.creovine.comA98.92.255.171EC2
reply.liraintelligence.comMXinbound-smtp.us-east-1.amazonaws.comSES

DNS is managed via Namecheap.

SSL/TLS

  • Backend: nginx with Let's Encrypt (auto-renewal via certbot)
  • Frontend: Vercel provides automatic SSL