agentleFS
cnoe-iocnoe-io/ai-platform-engineering/.claude/skills/docker-compose-first-install/SKILL.md

docker-compose-first-install

Skill438 starsChanged 53 days agoApache-2.0View on GitHub

Validate and repair the OSS first-install Docker Compose path. Use when editing docker-compose.yaml, docker-compose.dev.yaml, .env.example, release image tags, Compose profiles, Keycloak/OpenFGA/RAG defaults, or first-launch UI behavior for local all-in-one installs.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when a task touches:

    line 25
  2. Very specific:

    Do not add slack-bot or webex-bot to the default all-in-one path.

    line 43
  3. Distinctive:

    Run these before committing Compose/env changes:

    line 65
  4. Distinctive:

    Use non-destructive recovery first:

    line 126
  5. Distinctive:

    If Keycloak or OpenFGA state was seeded with bad env, reset only the local auth data volumes:

    line 133
  6. Distinctive:

    Only reset MongoDB when the user explicitly accepts losing local CAIPE data:

    line 143
  7. Distinctive:

    Do not add AI attribution comments or examples.

    line 151
  8. Distinctive:

    Use conventional commit titles.

    line 152
  9. Distinctive:

    Use only an explicitly provided human DCO trailer.

    line 153
  10. Very specific:

    Keep .env.example runnable for a first-time local OSS user.

    line 154
  11. Distinctive:

    Keep Docker Compose first install independent of proprietary providers.

    line 155

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Docker Compose First Install

Protect the plain OSS setup path:

cp .env.example .env
COMPOSE_PROFILES="mcp-servers,caipe-ui-prod,rbac,caipe-supervisor,dynamic-agents,rag,caipe-mongodb,web_ingestor" \
docker compose --env-file .env -f docker-compose.yaml up -d

This flow must work without Cisco-only systems, Slack/Webex bots, local image suffix overrides, or hidden operator knowledge.

When This Skill Applies

Use this skill when a task touches:

  • docker-compose.yaml
  • docker-compose.dev.yaml
  • .env.example
  • release image tags or image suffixes
  • first-install docs or launch commands
  • Keycloak, OpenFGA, RBAC, RAG, MongoDB, supervisor, dynamic agents, web ingestor
  • first-launch UI alerts, release prompts, migrations, or Keycloak health

Required Defaults

The minimal first-install profile set is:

mcp-servers,caipe-ui-prod,rbac,caipe-supervisor,dynamic-agents,rag,caipe-mongodb,web_ingestor

Do not add slack-bot or webex-bot to the default all-in-one path.

Required local Docker defaults:

  • IMAGE_TAG points at the latest supported stable release.
  • caipe-ui in docker-compose.yaml uses the published release tag, without a local-only -prod suffix.
  • caipe-ui has OPENFGA_HTTP=http://openfga:8080.
  • caipe-ui has OPENFGA_STORE_NAME=caipe-openfga.
  • dynamic-agents has AUTHZ_SERVICE_URL=http://caipe-ui:3000 so agent-use decisions can reach the UI BFF/CAS.
  • caipe-ui has Keycloak admin-client values that match the local realm seed:
    • KEYCLOAK_URL=http://keycloak:7080
    • KEYCLOAK_REALM=caipe
    • KEYCLOAK_RESOURCE_SERVER_ID=caipe-platform
    • KEYCLOAK_CLIENT_SECRET=caipe-platform-dev-secret
    • KEYCLOAK_ADMIN_CLIENT_ID=caipe-platform
    • KEYCLOAK_ADMIN_CLIENT_SECRET=caipe-platform-dev-secret
  • keycloak-init receives matching KEYCLOAK_UI_CLIENT_SECRET and KEYCLOAK_PLATFORM_CLIENT_SECRET.
  • UI healthchecks inside containers use 127.0.0.1, not localhost, when probing the local Next.js listener.

Validation Commands

Run these before committing Compose/env changes:

COMPOSE_PROFILES="mcp-servers,caipe-ui-prod,rbac,caipe-supervisor,dynamic-agents,rag,caipe-mongodb,web_ingestor" \
NEXTAUTH_SECRET=test \
docker compose --env-file .env.example -f docker-compose.yaml config --quiet

Inspect the rendered UI env:

COMPOSE_PROFILES="mcp-servers,caipe-ui-prod,rbac,caipe-supervisor,dynamic-agents,rag,caipe-mongodb,web_ingestor" \
NEXTAUTH_SECRET=test \
docker compose --env-file .env.example -f docker-compose.yaml config --format json \
| jq '.services["caipe-ui"].environment
  | {
      OPENFGA_HTTP,
      OPENFGA_STORE_NAME,
      KEYCLOAK_URL,
      KEYCLOAK_REALM,
      KEYCLOAK_RESOURCE_SERVER_ID,
      KEYCLOAK_CLIENT_SECRET,
      KEYCLOAK_ADMIN_CLIENT_ID,
      KEYCLOAK_ADMIN_CLIENT_SECRET
    }'

Inspect the rendered Dynamic Agents env:

COMPOSE_PROFILES="mcp-servers,caipe-ui-prod,rbac,caipe-supervisor,dynamic-agents,rag,caipe-mongodb,web_ingestor" \
NEXTAUTH_SECRET=test \
docker compose --env-file .env.example -f docker-compose.yaml config --format json \
| jq '.services["dynamic-agents"].environment | {AUTHZ_SERVICE_URL}'

Inspect Keycloak init secrets:

COMPOSE_PROFILES="mcp-servers,caipe-ui-prod,rbac,caipe-supervisor,dynamic-agents,rag,caipe-mongodb,web_ingestor" \
NEXTAUTH_SECRET=test \
docker compose --env-file .env.example -f docker-compose.yaml config --format json \
| jq '.services["keycloak-init"].environment
  | {KEYCLOAK_UI_CLIENT_SECRET, KEYCLOAK_PLATFORM_CLIENT_SECRET}'

Check rendered images:

COMPOSE_PROFILES="mcp-servers,caipe-ui-prod,rbac,caipe-supervisor,dynamic-agents,rag,caipe-mongodb,web_ingestor" \
NEXTAUTH_SECRET=test \
docker compose --env-file .env.example -f docker-compose.yaml config --images \
| sort

The UI image should be ghcr.io/cnoe-io/caipe-ui:<version>, not ghcr.io/cnoe-io/caipe-ui:<version>-prod, unless that suffixed image is known to be published for the release.

Recovery Commands For Local Testing

Use non-destructive recovery first:

COMPOSE_PROFILES="mcp-servers,caipe-ui-prod,rbac,caipe-supervisor,dynamic-agents,rag,caipe-mongodb,web_ingestor" \
docker compose --env-file .env -f docker-compose.yaml up -d --force-recreate caipe-ui dynamic-agents web_ingestor keycloak-init

If Keycloak or OpenFGA state was seeded with bad env, reset only the local auth data volumes:

docker compose --env-file .env -f docker-compose.yaml down
docker volume rm docker-compose-fixes_keycloak_postgres_data docker-compose-fixes_openfga_postgres_data
COMPOSE_PROFILES="mcp-servers,caipe-ui-prod,rbac,caipe-supervisor,dynamic-agents,rag,caipe-mongodb,web_ingestor" \
docker compose --env-file .env -f docker-compose.yaml up -d

Only reset MongoDB when the user explicitly accepts losing local CAIPE data:

docker volume rm docker-compose-fixes_mongodb_data docker-compose-fixes_mongodb_config

Guardrails

  • Do not add AI attribution comments or examples.
  • Use conventional commit titles.
  • Use only an explicitly provided human DCO trailer.
  • Keep .env.example runnable for a first-time local OSS user.
  • Keep Docker Compose first install independent of proprietary providers.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.