Saltar a contenido

🚀 Deployment Guide

How to deploy Aeternus to production.

Frontend Deployment (Vercel)

The frontend is deployed automatically to Vercel when you push to master.

Setup

  1. Connect your GitHub repo to Vercel
  2. Set environment variables in Vercel dashboard
  3. Enable automatic deployments on push

Environment Variables (Vercel)

Add these in Vercel project settings:

  • NEXT_PUBLIC_CORE_API_BASE_URL=https://api.aeternus.ai
  • DATABASE_URL=postgresql://... (production DB)
  • AUTH0_* variables
  • OPENAI_API_KEY
  • etc.

Backend Deployment (AWS ECS)

The backend is deployed to AWS ECS (Fargate) via GitHub Actions.

Automatic Deploy

  1. Push code to core/ directory on master
  2. GitHub Actions workflow triggers automatically
  3. Docker image is built and pushed to ECR
  4. ECS service is updated with new image
  5. Deployment is verified with health checks

This happens in 4 stages:

  1. 🔨 Build — Docker image → ECR
  2. 🚀 Deploy — Register task definition, update service
  3. ✅ Verify — Poll ECS until rollout completes
  4. 📊 Summary — Generate deployment report

Manual Deploy

scripts/aws/core/build-and-push.sh  # Build & push to ECR
scripts/aws/core/deploy-ecs.sh      # Update ECS service

Database Deployment

PostgreSQL (RDS)

Managed by AWS RDS. Backups are automatic.

To apply migrations in production:

DATABASE_URL=postgresql://prod-user:pass@prod-db/aeternus \
npx prisma migrate deploy

Neo4j (Neo4j Aura)

Managed by Neo4j cloud. No manual deployment needed.


Monitoring

Frontend (Vercel)

  • Vercel dashboard → Deployments
  • Check logs and analytics

Backend (AWS)

  • CloudWatch logs
  • ECS service status
  • ALB target health

Rollback

Frontend

  1. Vercel dashboard
  2. Find previous successful deployment
  3. Click "Promote to Production"

Backend

  1. AWS ECS console
  2. Select previous task definition
  3. Update service with old task definition

See AWS documentation for detailed setup.