Run Deployment
Deploy Chatty AI using Docker Compose.
Prerequisites
Before deploying:
- Infrastructure Checklist completed
- Environment configured
-
.envfile configured with all required variables - SSL certificates in place
- DNS records pointing to server
Step 1: Pull Docker Images
Pull all required Docker images:
# Navigate to deploy directory
cd chatty-app-deploy/deploy
# Pull images
docker compose pull
Expected output:
Pulling db...
Pulling qdrant...
Pulling chattyai...
Pulling pipelines...
Pulling n8n...
Pulling chattydatabases...
...
This may take 5-10 minutes depending on internet speed.
Step 2: Start Services
Start all services in detached mode:
docker compose up -d
Expected output:
Creating network "chatty-app_default"
Creating volume "chatty-app_db_data"
Creating volume "chatty-app_qdrant"
...
Creating chatty-app_db_1
Creating chatty-app_qdrant_1
Creating chatty-app_chattyai_1
...
Step 3: Monitor Startup
Watch containers starting:
# View container status
watch docker compose ps
# Or
docker compose ps
All containers should show "Up" status.
Step 4: Check Logs
Monitor logs for errors:
# View all logs
docker compose logs -f
# View specific service
docker compose logs -f chattyai
docker compose logs -f nginx
docker compose logs -f db
Look for:
- "Server started" messages
- "Database connected" messages
- No ERROR or CRITICAL messages
Press Ctrl+C to exit log view.
Step 5: Verify All Containers Running
Check all 11 containers are running:
docker compose ps
Expected containers:
- nginx
- chattyai
- db (PostgreSQL)
- qdrant
- pipelines
- n8n
- chattydatabases
- chattydatabases-engine
- chattydatabases-ibis
- chattydatabases-ai-service
- chattydatabases-bootstrap (may exit after initialization)
Step 6: Test HTTPS Access
Test access to services:
# Test Chatty AI
curl -I https://YOUR_CHATTYAI_DOMAIN
# Test n8n
curl -I https://YOUR_N8N_DOMAIN
# Test Databases
curl -I https://YOUR_DATABASES_DOMAIN
Expected: HTTP 200 or 302 (redirect to login)
Deployment Timeline
Typical deployment timeline:
| Phase | Duration | What Happens |
|---|---|---|
| Image Pull | 5-10 min | Download Docker images from registry |
| Container Start | 2-3 min | Start all containers |
| Database Init | 1-2 min | Initialize PostgreSQL database |
| Service Ready | 1-2 min | All services become healthy |
| Total | 10-15 min | Complete deployment |
Troubleshooting
Containers Won't Start
Check logs for errors:
docker compose logs chattyai
docker compose logs db
Common issues:
- Missing environment variables
- Certificate path incorrect
- Port conflicts
- Insufficient resources
Port Conflicts
Check if ports are already in use:
sudo netstat -tulpn | grep -E ':(80|443|5432|6333)'
Database Connection Errors
Verify database is running:
docker compose ps db
docker compose logs db
Check DATABASE_URL in .env:
grep DATABASE_URL .env
Certificate Errors
Verify certificates:
# Check certificate files exist
ls -la ../certs/*/
# Check nginx logs
docker compose logs nginx | grep -i certificate
Insufficient Resources
Check system resources:
# Check memory
free -h
# Check disk
df -h
# Check CPU
top
Managing Services
Stop All Services
docker compose down
Restart All Services
docker compose restart
Restart Specific Service
docker compose restart chattyai
docker compose restart nginx
View Service Status
docker compose ps
View Resource Usage
docker stats
Updating Deployment
Pull Latest Images
# Pull new images
docker compose pull
# Restart with new images
docker compose up -d
Update Environment Variables
# Edit .env
nano .env
# Restart services
docker compose down
docker compose up -d
Update Certificates
# Replace certificates
cp new-cert.pem ../certs/chattyai/fullchain.pem
cp new-key.pem ../certs/chattyai/privkey.pem
# Restart nginx
docker compose restart nginx
Backup Before Changes
Always backup before making changes:
# Backup database
docker compose exec db pg_dump -U chattyAdmin chattydb > backup-$(date +%Y%m%d).sql
# Backup volumes
docker run --rm -v chatty-app_db_data:/data -v $(pwd):/backup ubuntu tar czf /backup/db-backup-$(date +%Y%m%d).tar.gz /data
See Backup & Restore for details.
Post-Deployment
After successful deployment:
- Verify Deployment
- Complete Post-Install Checklist
- Configure users and permissions
- Set up monitoring
- Schedule backups
Useful Commands
# View all containers
docker compose ps
# View logs
docker compose logs -f
# Restart all
docker compose restart
# Stop all
docker compose down
# Start all
docker compose up -d
# Pull updates
docker compose pull
# Remove everything (CAREFUL!)
docker compose down -v # Deletes volumes!
Next Steps
Support
For deployment issues:
- Email: support@chatty-ai.ai
- Include:
- Container logs (
docker compose logs) - Environment file (remove secrets!)
- Error messages deployment.
- Container logs (