Deployment
Docker Deployment
A planned guide for deploying a hosted Dits server with Docker and Docker Compose.
Important
Planned — not yet available. There is no
dits/dits-serverDocker image to run today — the server component is part of the roadmap and has not been built. Dits today is a local-first Rust CLI; install it withnpm install -g @byronwade/dits. The Compose files and commands below are illustrative of the intended design, not working instructions.Prerequisites
- Docker 20.10 or later
- Docker Compose v2.0 or later
- 4GB RAM minimum (8GB recommended)
- 20GB disk space minimum
Quick Start with Docker Compose
1. Create docker-compose.yml
version: "3.8"
services:
dits:
image: dits/dits-server:latest
ports:
- "8080:8080"
environment:
- DATABASE_URL=postgres://dits:ditspass@postgres:5432/dits
- REDIS_URL=redis://redis:6379
- JWT_SECRET=your-secure-secret-here
- STORAGE_TYPE=local
- STORAGE_PATH=/data/chunks
volumes:
- dits-data:/data
depends_on:
- postgres
- redis
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_USER=dits
- POSTGRES_PASSWORD=ditspass
- POSTGRES_DB=dits
volumes:
- postgres-data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
volumes:
- redis-data:/data
volumes:
dits-data:
postgres-data:
redis-data:2. Start the Stack
# Start all services
docker compose up -d
# Check status
docker compose ps
# View logs
docker compose logs -f dits3. Verify Installation
# Check health endpoint
curl http://localhost:8080/health
# Configure CLI to use local server
dits remote add local http://localhost:8080Production Configuration
Environment Variables
| Variable | Description | Required |
|---|---|---|
| DATABASE_URL | PostgreSQL connection string | |
| REDIS_URL | Redis connection URL | Optional |
| JWT_SECRET | Secret for token signing | |
| STORAGE_PATH | Path for chunk storage | Default: /data |
| LOG_LEVEL | Logging verbosity | Default: info |
Maintenance
Next Steps
For high-availability production deployments, consider using Kubernetes for automatic scaling and failover.