Docker Compose
Deploy DBCraft with Docker Compose for easy local development and simple production setups.
docker-compose.yml
Create a docker-compose.yml file with the following content:
docker-compose.yml
version: '3.8'
services:
dbcraft:
image: krishcdbry/dbcraft:latest
container_name: dbcraft
restart: unless-stopped
ports:
- "3001:9000"
volumes:
- dbcraft_data:/app/data
environment:
- PORT=9000
- JWT_SECRET=your-secure-secret-key-at-least-32-characters
- LOG_LEVEL=info
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:9000/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
volumes:
dbcraft_data:
driver: localStart DBCraft
Terminal
# Start in detached mode
docker-compose up -d
# View logs
docker-compose logs -f dbcraft
# Stop
docker-compose down