Stand up Postgres + the chachaml UI on a single host so a small team can share runs.
A docker compose up that gives everyone on the team a running
chachaml UI, persistent shared storage, and a Postgres they can
point their REPLs at.
docker compose plugin).The repo ships a working docker-compose.yml:
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: chachaml
POSTGRES_USER: chachaml
POSTGRES_PASSWORD: chachaml
volumes:
- pg-data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U chachaml"]
interval: 5s
timeout: 5s
retries: 5
chachaml:
build: .
environment:
DB_TYPE: postgres
JDBC_URL: jdbc:postgresql://postgres:5432/chachaml
DB_USER: chachaml
DB_PASSWORD: chachaml
ARTIFACT_DIR: /data/artifacts
PORT: "8080"
ports:
- "8080:8080"
volumes:
- artifact-data:/data/artifacts
depends_on:
postgres:
condition: service_healthy
volumes:
pg-data:
artifact-data:
docker compose up -d
The chachaml image builds from the Dockerfile in the repo. First
run pulls Postgres and compiles the chachaml image (~2 minutes).
http://<host>:8080/runspsql -h <host> -U chachaml -d chachaml (password
chachaml).From a teammate's REPL:
(ml/use-store!
(store/open {:type :postgres
:jdbc-url "jdbc:postgresql://<host>:5432/chachaml"
:username "chachaml"
:password "chachaml"}))
(ml/with-run {:experiment "team-smoke"}
(ml/log-metric :hello 1.0))
Browse to http://<host>:8080/runs — the teammate's run is visible.
The defaults are demo defaults. Before letting humans rely on this:
.env file or your
secrets manager rather than in the compose file.5432:5432
port mapping if everyone connects via the UI's network.postgres:16-alpine with a specific
digest if you want reproducible builds.For larger teams or cross-region access, point the artifact store at S3 instead of the local volume:
chachaml:
environment:
ARTIFACT_STORE: s3
S3_BUCKET: ml-artifacts
S3_PREFIX: chachaml/
AWS_REGION: us-east-1
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY via secrets
See use-s3-for-artifacts (P1).
postgres), not localhost. The compose
network resolves service names automatically./runs is blank — verify the chachaml container
picked up the JDBC_URL env var (docker compose logs chachaml).
If it fell back to SQLite, you'll see runs you create through that
container's SQLite, but teammates connecting to Postgres will
see nothing.docker compose down -v deleted everything — -v removes
named volumes. That's intentional for resetting; for a non-destructive
stop use docker compose down (no -v).Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |