Platforms
Docker Compose
Deploy Rivet Engine with docker-compose for multi-container setups.
Run with ephemeral storage:
Quick Start
services:
rivet-engine:
image: rivetdev/engine:latest
ports:
- "6420:6420"
restart: unless-stopped
Run with persistent storage:
services:
rivet-engine:
image: rivetdev/engine:latest
ports:
- "6420:6420"
volumes:
- rivet-data:/data
environment:
RIVET__FILE_SYSTEM__PATH: "/data"
restart: unless-stopped
volumes:
rivet-data:
Start the services:
docker-compose up -d
Configuration
Environment Variables
Configure Rivet using environment variables in your compose file:
services:
rivet-engine:
image: rivetdev/engine:latest
ports:
- "6420:6420"
volumes:
- rivet-data:/data
environment:
RIVET__POSTGRES__URL: "postgresql://postgres:password@localhost:5432/db"
restart: unless-stopped
volumes:
rivet-data:
Or use a .env file:
# .env
POSTGRES_PASSWORD=secure_password
RIVET__POSTGRES__URL=postgresql://rivet:secure_password@postgres:5432/rivet
Reference in compose:
services:
rivet-engine:
env_file:
- .env
Config File
Mount a JSON configuration file:
services:
rivet-engine:
image: rivetdev/engine:latest
ports:
- "6420:6420"
volumes:
- ./rivet-config.json:/etc/rivet/config.json:ro
- rivet-data:/data
restart: unless-stopped
volumes:
rivet-data:
Create the config file (rivet-config.json):
{
"postgres": {
"url": "postgresql://rivet:password@postgres:5432/rivet"
}
}
Production Setup
With PostgreSQL
services:
postgres:
image: postgres:15
environment:
POSTGRES_DB: rivet
POSTGRES_USER: rivet
POSTGRES_PASSWORD: rivet_password
volumes:
- postgres-data:/var/lib/postgresql/data
restart: unless-stopped
rivet-engine:
image: rivetdev/engine:latest
ports:
- "6420:6420"
environment:
RIVET__POSTGRES__URL: postgresql://rivet:rivet_password@postgres:5432/rivet
depends_on:
- postgres
restart: unless-stopped
volumes:
postgres-data:
Next Steps
- See Configuration for all options