Deployment Guide
Deployment Options
| Method | Best For | Complexity |
|---|---|---|
| Docker Compose | Small teams, staging | Low |
| Kubernetes | Production at scale | High |
| AWS/GCP managed | Cloud-native apps | Medium |
| Bare metal | Maximum control | Medium |
Docker Compose (Recommended Start)
version: "3.8"
services:
nexusdb:
image: nexusdb/server:3.2
restart: unless-stopped
ports:
- "4200:4200"
environment:
NEXUSDB_ENV: production
NEXUSDB_SECRET: ${NEXUSDB_SECRET}
NEXUSDB_MEMORY_LIMIT: 4096
volumes:
- data:/data
- ./nexusdb.yaml:/etc/nexusdb/config.yaml:ro
healthcheck:
test: ["CMD", "nexusdb", "health"]
interval: 30s
timeout: 10s
retries: 3
volumes:
data:Kubernetes
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nexusdb
spec:
replicas: 3
selector:
matchLabels:
app: nexusdb
template:
metadata:
labels:
app: nexusdb
spec:
containers:
- name: nexusdb
image: nexusdb/server:3.2
ports:
- containerPort: 4200
resources:
requests:
memory: "2Gi"
cpu: "1000m"
limits:
memory: "4Gi"
cpu: "2000m"
volumeMounts:
- name: data
mountPath: /data
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 50GiHealth Checks
curl -s http://localhost:4200/health
# {"status":"healthy","version":"3.2.1","uptime":86400}Monitoring
NexusDB exposes Prometheus metrics at /metrics:
curl http://localhost:4200/metrics
# nexusdb_queries_total{collection="users"} 45231
# nexusdb_query_duration_seconds{quantile="0.99"} 0.025
# nexusdb_documents_total{collection="users"} 15432
# nexusdb_storage_bytes 2147483648