Setting up DevLens with Docker‑Compose (Toml Config)
Below is a ready‑to‑run docker-compose.yml that starts all three DevLens services (app, agent, AI) on a single host.
The three containers share a single configuration file (devlens.toml) and a data directory (/home/demo/devlens/data) that is persisted on the host.
Prerequisites
- Docker Engine 20.10+ (or Docker Desktop)
- Docker Compose 1.29+ (or the Docker‑CLI built‑in compose plugin)
- VERSION environment variable set to the image tag you want to use (or hard‑code the tag).
1. Folder layout
/home/demo/devlens/
├─ data/
│ ├─ devlens.toml ← Toml configuration (create below)
│ └─ (persistent DB & logs will appear here)
└─ docker-compose.yml
Create the data directory first:
sudo mkdir -p /home/demo/devlens/data
2. Docker‑Compose file
Place the following docker-compose.yml in /home/demo/devlens/.
It mounts the data directory into each container and points the entrypoints at the shared Toml file.
# docker-compose.yml
services:
app:
container_name: app
image: source.rdctd.de/devlens/app:${VERSION:-latest}
restart: always
volumes:
- /home/demo/devlens/data:/data
entrypoint: /app/src/app -config=/data/devlens.toml
agent:
container_name: agent
image: git.rdctd.de/devlens/agent:${VERSION:-latest}
restart: always
volumes:
- /home/demo/devlens/data:/data
entrypoint: /app/src/agent -config=/data/devlens.toml
ai:
container_name: ai
image: git.rdctd.de/devlens/ai:${VERSION:-latest}
restart: always
volumes:
- /home/demo/devlens/data:/data
entrypoint: /app/src/ai -config=/data/devlens.toml
Version handling – If you export
VERSION=1.2.3before running Compose, Docker will pull the matching tags. Otherwise it defaults tolatest.
3. Spin up DevLens
cd /home/demo/devlens
docker compose up -d
Docker will:
- Pull the three images (
app,agent,ai). - Create the containers and mount
/home/demo/devlens/datainside each. - Start each service with the shared
devlens.toml.
You can verify that everything is running:
docker compose ps
# Should show all three containers in the "Up" state
# Tail logs
docker compose logs -f
Open a browser to http://localhost:3000 (or the host’s IP) to see the DevLens UI.
4. Updating the configuration
If you edit devlens.toml, the changes will be picked up the next time a container restarts.
For a hot‑reload without downtime, restart the affected container:
docker compose restart app # or agent, ai
5. Persisting data
All persistent files (SQLite DB, logs, retention‑kept data) are written to /home/demo/devlens/data.
Back up this directory to protect your telemetry and history.
6. Clean‑up
To stop and remove all containers:
docker compose down
If you want to wipe all data as well:
docker compose down -v && rm -rf /home/demo/devlens/data/*
Quick Recap
- Create
/home/demo/devlens/data. - Write
devlens.tomlwith your secrets. - Place the
docker-compose.yml. - Run
docker compose up -d. - Open
http://localhost:8000to see DevLens in action.