Skip to main content
CID222 Docs

Compose profiles and CLI

Which compose profile starts what, which overlay file changes what, and the make targets and update flags an operator runs on a direct install.

  • Version: 0.4
  • Role: admin_user
  • Type: reference

The commands on this page apply to a direct install — CID222 running from the compose files on a host you administer.

Warning

An appliance runs a rendered release compose file placed by the signed release, and its lifecycle belongs to the updater on its host. Do not run these commands on an appliance: use Settings → System Updates instead. See Update the appliance.

Profiles

A service with no profile starts on a plain docker compose up -d. A profile is additive — it starts its services alongside the defaults rather than replacing them. Which service belongs to which profile is generated in services, ports and profiles.

ProfileStartsUse it when
(none)The 19 services that make up the productAlways
llm-analystrisk-analyst, mcp-serverYou run the LLM Risk Analyst. Enterprise tier
inline-proxycid-inline-proxyCID222 is the forward proxy for client browsers
userid-agentcid-userid-agentYou attribute inspected traffic to Active Directory users
routingcost-analyzerYou run cost-based model routing
gpuocr-service-gpuYou have an NVIDIA card and want the transformer OCR engine
llmllm-inferenceThe analyst's model engine runs on this host rather than a separate GPU machine
llm-buildweights-fetchYou are building the analyst model bundle, not serving it
toolspgadmin, redis-commanderDevelopment only. Both expose a database console
ldap-testopenldap-testDevelopment only — a throwaway directory to test LDAP against
mailtestmailpitDevelopment only — captures outbound mail instead of sending it

Danger

Never start tools, ldap-test or mailtest on a production host. pgadmin and redis-commander are unauthenticated consoles onto the product's own data, and a release compose deliberately never ships mailpit.

Compose files

The base file is always first; an overlay is added with a second -f.

FileWhat it changes
docker-compose.ymlThe base stack. Every secret is a ${VAR:-default} placeholder, so it starts without an environment file
docker-compose.dev.ymlDevelopment overlay: volume mounts, watch mode, and the only place that opts back into schema auto-sync
docker-compose.prod.ymlProduction overlay: nginx for the dashboard, no host port mappings on internal services, Caddy for TLS. Needs Docker Compose 2.20 or newer
docker-compose.public.ymlThe public-facing deploy overlay used by deploy-public.sh
docker-compose.gpu.ymlRebuilds ocr-service to run PaddleOCR on CUDA
docker-compose.llm-gpu.ymlThe analyst model engine on a GPU host
docker-compose.llm-build.ymlBuilds the analyst model bundle

Make targets

make help prints the full list. These are the ones an operator uses.

TargetDoes
make first-runBuild every image, then start the stack
make up / make downStart / stop
make restartRestart, then report health
make statusContainer status
make healthHealth state per container
make statsLive resource usage
make logs / make logs-apiFollow all logs / the gateway's logs
make shell-apiA shell inside the gateway container
make update-smartRebuild only the services whose code changed
make update-api / make update-dashboard / make update-mlRebuild one service
make rebuildRebuild every image with no cache
make update-dbApply pending database migrations
make migration-statusList applied and pending migrations
make migration-verifyApply the whole chain to throwaway copies of an empty database and of this box's schema, and assert nothing is lost
make migration-baselineStamp the initial schema on a database that predates migrations
make schema-driftReport entity-versus-schema drift; silence means none
make seedRun the database seeder
make check-licensesRefuse AGPL, GPL and SSPL dependencies
make sbomA CycloneDX software bill of materials per shipped image
make airgap-verifyRun real OCR with the network disabled, to prove the models are in the image

Warning

make seed and make update-db-reseed run the full seeder, which resets seeded account passwords. They are for a development or hub box. Never run either against a production installation.

Updating a direct install

./update.sh is the supported in-place update. It refuses a dirty git working tree, pulls the tracked branch, maps the changed paths to compose services, takes a pg_dump, rebuilds only what changed, recreates those containers, and waits for the health checks.

FlagEffect
(none)Pull, then rebuild only the services whose source changed
--fullRebuild every service. Use after a large infrastructure change
--no-pullRebuild from the current checkout without pulling
--branch <name>Check that branch out first
--skip-backupSkip the database dump. Faster, and it removes the only thing the failure path restores from
Exit codeMeans
0Success
2The working tree is dirty; nothing was done
3The pull failed
4A build failed
5The health wait timed out. The database was restored from the dump; the new containers were left running so their logs survive

Backups are written to ./backups and the last 14 are kept. The location is a shell variable of the script rather than a product setting: set a backup directory in the environment you run ./update.sh from to override it.

Notes

  • Ports in the generated table are host-side. Inside the compose network services address each other by service name, on a port that is not always the same number.
  • A profile is opt-in, never opt-out. There is no profile that removes a default service; to run without one, stop it.
  • The GPU paths are mutually exclusive. docker-compose.gpu.yml rebuilds ocr-service on CUDA, while the gpu profile's ocr-service-gpu takes over the same container name with a different engine. Run one or the other. See resource sizing.

Last updated on

On this page

Download PDF