Skip to main content
Use Compose when the agent should live in the same stack as your database or your other services.
1

Write the service

Save this as compose.yaml:
compose.yaml
No ports: section. The agent listens on nothing.
2

Put the secrets in .env

Next to compose.yaml, create .env and keep it out of version control:
.env
If the database runs in the same Compose project, use its service name as <host>.
3

Start it

Look for serving dataset in the logs.
After the first start, the agent reads its credentials from the cubit-agent volume and ignores CUBIT_ENROLL_TOKEN. You can remove the token from .env.
docker compose down -v deletes the volume, and the agent’s enrollment with it. Use docker compose down without -v to keep it.