Docker Deployment
Nexora ships as a Docker Compose stack. This guide covers production deployment.
System requirements
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 2 cores | 4+ cores |
| RAM | 4 GB | 8+ GB |
| Disk | 20 GB | 50+ GB |
| OS | Ubuntu 22.04 / Debian 12 | Ubuntu 24.04 |
| Docker | 24.0+ | Latest |
Services
| Service | Image | Port | Role |
|---|---|---|---|
nginx | nginx:alpine | 80 (external) | Reverse proxy |
backend | Custom (multi-stage) | 8000 (internal) | FastAPI |
frontend | Custom | 3000 (internal) | Next.js |
postgres | postgres:16-alpine | 5432 (internal) | Database |
redis | redis:7-alpine | 6379 (internal) | Cache + pub/sub |
Prepare the server
apt update && apt install -y docker.io docker-compose-plugin git
systemctl enable --now dockerClone and configure
git clone https://github.com/ParendumOU/Nexora.git /opt/nexora
cd /opt/nexora
cp .env.example .env
nano .envGenerate secrets
# SECRET_KEY
openssl rand -hex 32
# ENCRYPTION_KEY (Fernet)
python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"Start
make upRun migrations
docker compose exec backend alembic upgrade headVerify
make ps
curl http://localhost/healthLogs
make logs # all services
docker compose logs -f backend # backend onlyUpgrades
git pull
make up
docker compose exec backend alembic upgrade headAlways run alembic upgrade head after pulling new code that includes migration files.
Backups
Database
# Use your POSTGRES_USER / POSTGRES_DB from .env (default: nexora)
docker compose exec postgres pg_dump -U nexora nexora > backup_$(date +%Y%m%d).sqlRestore
cat backup_20260101.sql | docker compose exec -T postgres psql -U nexora nexoraPersistent volumes
| Volume | Contents |
|---|---|
postgres_data | Database files |
redis_data | Redis persistence |
Do not run make clean in production — it destroys these volumes.