Files
Peter Foster 473bef96e9 chore: Update all TrueCV references to RealCV
- Updated Dockerfiles (Dockerfile, Dockerfile.migrations)
- Updated docker-compose.yml (service names, container names, network)
- Updated deploy scripts (README.md, server-setup.sh, deploy.sh)
- Updated .gitignore
- Updated all strategy documentation files
- Updated app.js comment

Note: Passwords containing "TrueCV" were intentionally preserved.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 21:01:07 +00:00
..

RealCV Deployment Guide

Quick Start

1. Server Setup (run once on fresh Ubuntu server)

# Copy server-setup.sh to your server
scp deploy/server-setup.sh user@your-server:/tmp/

# SSH into server and run setup
ssh user@your-server
sudo bash /tmp/server-setup.sh

Before running, edit the script and update:

  • DOMAIN - Your domain name
  • DB_PASSWORD - Strong password for SQL Server
  • ADMIN_EMAIL - Email for SSL certificate notifications

2. Deploy Application (run from dev machine)

# Edit deploy.sh and update configuration
nano deploy/deploy.sh

# Make executable and run
chmod +x deploy/deploy.sh
./deploy/deploy.sh

Update these values in deploy.sh:

  • SERVER_USER - SSH username
  • SERVER_HOST - Server hostname or IP
  • DOMAIN - Your domain name

3. Enable SSL

After DNS is configured and app is deployed:

ssh user@your-server
sudo certbot --nginx -d realcv.yourdomain.com

Configuration

Environment Variables

The systemd service sets these environment variables:

  • ASPNETCORE_ENVIRONMENT=Production
  • ASPNETCORE_URLS=http://localhost:5000
  • ConnectionStrings__DefaultConnection=...

To add more (like API keys), edit:

sudo systemctl edit realcv

Add:

[Service]
Environment=OpenAI__ApiKey=your-key-here

appsettings.Production.json

For sensitive settings, create /var/www/realcv/appsettings.Production.json:

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=127.0.0.1;Database=RealCV;User Id=SA;Password=YourPassword;TrustServerCertificate=True"
  },
  "OpenAI": {
    "ApiKey": "your-openai-key"
  }
}

Maintenance

View Logs

# Application logs
sudo journalctl -u realcv -f

# Nginx logs
sudo tail -f /var/log/nginx/access.log
sudo tail -f /var/log/nginx/error.log

# SQL Server logs
docker logs realcv-sql -f

Restart Services

sudo systemctl restart realcv
sudo systemctl restart nginx
docker restart realcv-sql

Database Backup

# Backup
docker exec realcv-sql /opt/mssql-tools18/bin/sqlcmd \
    -S localhost -U SA -P 'YourPassword' -C \
    -Q "BACKUP DATABASE RealCV TO DISK='/var/opt/mssql/backup/realcv.bak'"

# Copy backup from container
docker cp realcv-sql:/var/opt/mssql/backup/realcv.bak ./realcv-backup.bak

Rollback Deployment

# On server - restore previous version
sudo systemctl stop realcv
sudo rm -rf /var/www/realcv
sudo mv /var/www/realcv.backup.YYYYMMDD_HHMMSS /var/www/realcv
sudo systemctl start realcv

Troubleshooting

App won't start

# Check status
sudo systemctl status realcv

# Check logs
sudo journalctl -u realcv -n 100

# Test manually
cd /var/www/realcv
sudo -u www-data dotnet RealCV.Web.dll

Database connection issues

# Check SQL Server is running
docker ps | grep realcv-sql

# Test connection
docker exec -it realcv-sql /opt/mssql-tools18/bin/sqlcmd \
    -S localhost -U SA -P 'YourPassword' -C \
    -Q "SELECT name FROM sys.databases"

Blazor SignalR issues

Ensure Nginx is configured for WebSocket support (included in setup script).

Check browser console for connection errors.

Security Checklist

  • Change default SQL Server password
  • Enable SSL with Let's Encrypt
  • Configure firewall (UFW)
  • Set up automated backups
  • Enable fail2ban for SSH protection
  • Keep system updated regularly