TL;DR: CIB seven 2.2 ships as one monolithic Docker image — but you can decompose the deployment by externalizing auth (Keycloak locally, ORY stack in production), running the engine headless with your own frontend via REST API and external tasks, and scaling the single image behind a reverse proxy. The decomposition is about service boundaries, not separate images.
Reality check: one image, many patterns
CIB seven’s Docker images bundle everything into one container:
| Image Tag | Contents | Port |
|---|---|---|
cibseven/cibseven (default) | Engine + Web Apps + REST API on Tomcat | 8080 |
cibseven/cibseven:run-2.2.0 | Spring Boot “Run” distro, embedded server | 8080 |
cibseven/cibseven:wildfly-2.2.0 | WildFly distribution | 8080 |
There are no separate images for webclient, modeler, or cockpit — they’re all bundled together.
But decomposition is still possible through three patterns:
- External auth — replace built-in DB identity with Keycloak (local) or ORY stack (production)
- Headless engine — run the engine without its UI and build your own frontend via REST API + external tasks
- Multiple instances behind a proxy — scale horizontally with Traefik/Nginx routing different paths to different containers
Architecture: decomposition patterns
CIB seven follows a shared-nothing model internally — the webclient talks to the engine only via REST API, not through JVM shared memory. This means you can decompose along auth boundaries even though the Docker image is monolithic.
+ Web Apps + REST API] end subgraph Data ["Data Layer"] P[(PostgreSQL 17)] end T --> E T --> K E -- JDBC --> P E -- OIDC Login --> K classDef auth fill:#1a365d,stroke:#4299e1,color:white; classDef proxy fill:#2d3748,stroke:#a0aec0,color:white; classDef backend fill:#c53030,stroke:#fc8181,color:white; classDef data fill:#553c9a,stroke:#b794f4,color:white; class K auth; class T proxy; class E backend; class P data;
The real decomposition happens at the auth boundary and the API boundary: externalize identity (Keycloak/ORY) and use the engine REST API for custom frontends.
Scenario 1: Local dev with Keycloak (auth-decomposed)
The simplest meaningful decomposition: CIB seven’s monolithic image + external PostgreSQL + Keycloak for auth. Three containers, clean separation of concerns.
services: # ────────────────────────────────────── # Database — PostgreSQL 17 (not H2!) # ────────────────────────────────────── postgres: image: postgres:17-alpine environment: POSTGRES_DB: cibseven POSTGRES_USER: cibseven POSTGRES_PASSWORD: cibseven-dev ports: - "5432:5432" volumes: - pg-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U cibseven"] interval: 10s retries: 5
# ────────────────────────────────────── # Auth — Keycloak with OIDC provider # ────────────────────────────────────── keycloak: image: quay.io/keycloak/keycloak:26.0 command: start-dev --import-realm environment: KC_BOOTSTRAP_ADMIN_USERNAME: admin KC_BOOTSTRAP_ADMIN_PASSWORD: admin KC_DB: postgres KC_DB_URL: jdbc:postgresql://postgres:5432/cibseven-keycloak KC_DB_USERNAME: cibseven KC_DB_PASSWORD: cibseven-dev ports: - "8180:8080" volumes: - ./keycloak/realms:/opt/keycloak/data/import depends_on: postgres: condition: service_healthy
# ────────────────────────────────────── # CIB seven — Engine + Web Apps + REST API # Uses Keycloak for identity via OAuth2 # ────────────────────────────────────── cibseven: image: cibseven/cibseven:run-2.2.0 environment: JAVA_OPTS: >- -XX:MaxRAMPercentage=70.0 -Dcamunda.bpm.database.type=postgres -Dspring.datasource.url=jdbc:postgresql://postgres:5432/cibseven?currentSchema=cibseven_engine -Dspring.datasource.username=cibseven -Dspring.datasource.password=cibseven-dev # OAuth2 / OIDC config for engine REST API + web apps CAMUNDA_BPM_OAUTH2_ENABLED: "true" CAMUNDA_BPM_OAUTH2_ISSUER_URI: http://keycloak:8080/realms/cibseven CAMUNDA_BPM_OAUTH2_CLIENT_ID: cibseven-engine CAMUNDA_BPM_OAUTH2_CLIENT_SECRET: ${KEYCLOAK_ENGINE_SECRET} CAMUNDA_BPM_OAUTH2_IDENTITY_PROVIDER_ENABLED: "true" ports: - "8080:8080" depends_on: postgres: condition: service_healthy keycloak: condition: service_started
volumes: pg-data:Ports for local dev
| Service | Local Port | URL |
|---|---|---|
| CIB seven (Engine + Web Apps) | 8080 | http://localhost:8080 |
| Keycloak Admin Console | 8180 | http://localhost:8180 |
Keycloak realm setup
Create keycloak/realms/cibseven-realm.json:
{ "realm": "cibseven", "enabled": true, "clients": [ { "clientId": "cibseven-engine", "enabled": true, "serviceAccountsEnabled": true, "secret": "${KEYCLOAK_ENGINE_SECRET}", "protocol": "openid-connect" } ], "roles": { "realm": [ {"name": "admin"}, {"name": "cockpit-user"}, {"name": "tasklist-user"} ] }}Scenario 2: Custom frontend with headless engine + workers
This is where the real microservice decomposition happens. The CIB seven container runs as a headless BPM orchestrator — your custom frontend replaces Cockpit/Tasklist, and external task workers execute process steps in any language.
services: postgres: image: postgres:17-alpine environment: POSTGRES_DB: cibseven POSTGRES_USER: cibseven POSTGRES_PASSWORD: cibseven-dev volumes: - pg-data:/var/lib/postgresql/data
keycloak: image: quay.io/keycloak/keycloak:26.0 command: start-dev --import-realm environment: KC_BOOTSTRAP_ADMIN_USERNAME: admin KC_BOOTSTRAP_ADMIN_PASSWORD: admin KC_DB_URL: jdbc:postgresql://postgres:5432/cibseven-keycloak volumes: - ./keycloak/realms:/opt/keycloak/data/import ports: - "8180:8080"
# CIB seven — headless mode (engine + REST API only) cibseven: image: cibseven/cibseven:run-2.2.0 environment: JAVA_OPTS: >- -XX:MaxRAMPercentage=70.0 -Dcamunda.bpm.database.type=postgres -Dspring.datasource.url=jdbc:postgresql://postgres:5432/cibseven?currentSchema=cibseven_engine -Dspring.datasource.username=cibseven -Dspring.datasource.password=cibseven-dev CAMUNDA_BPM_OAUTH2_ENABLED: "true" CAMUNDA_BPM_OAUTH2_ISSUER_URI: http://keycloak:8080/realms/cibseven ports: - "8080:8080" # engine-rest only (no web UI)
# Your custom frontend — React, Vue, Astro, whatever my-frontend: build: ./my-frontend ports: - "3000:3000" environment: CIBSEVEN_API_URL: http://cibseven:8080/engine-rest VITE_KEYCLOAK_ISSUER: http://keycloak:8080/realms/cibseven
# Worker 1 — Node.js service for email sending worker-email: build: ./worker-email environment: CIBSEVEN_API_URL: http://cibseven:8080/engine-rest WORKER_TOPICS: SendEmail,NotifyUser
# Worker 2 — Go service for data processing worker-data: build: ./worker-data environment: CIBSEVEN_API_URL: http://cibseven:8080/engine-rest WORKER_TOPICS: ProcessData,ValidateInput
volumes: pg-data:The engine REST API exposes everything you need:
| Endpoint Group | Use Case |
|---|---|
/process-definition | Deploy and manage BPMN processes |
/task | Claim, complete, assign tasks (your own tasklist UI) |
/external-task/fetchAndLock | Poll workers for decoupled execution |
/history | Process instance history (your own cockpit UI) |
/decision-definition | DMN decision tables |
The external task pattern is the key to headless BPM. Your backend services in any language poll POST /engine-rest/external-task/fetchAndLock:
curl -X POST http://localhost:8080/engine-rest/external-task/fetchAndLock \ -H "Content-Type: application/json" \ -d '{ "workerId": "my-node-worker-1", "maxTasks": 5, "topics": ["SendEmail"], "lockDuration": 30000 }'This is how you integrate CIB seven into an existing microservice architecture — the engine coordinates, your services execute.
Custom frontend use cases: why replace Cockpit/Tasklist?
CIB seven’s built-in web apps (Cockpit, Tasklist, Admin) work for generic BPM workflows but fall apart when you need domain-specific UX. Here are the real reasons teams build custom frontends:
1. Dynamic forms — the #1 reason. CIB seven’s task claim/complete UI is static. Real business processes need dynamic forms: conditional fields based on previous answers, file uploads with preview, nested sub-forms for multi-step approvals. With a custom frontend you integrate form engines (JSON Schema + @rjsf/core, Form.io, or Go HTMX server-rendered partials) and wire them to CIB seven’s /task/{id}/variables endpoint.
2. Context-aware task lists. Tasklist shows tasks in isolation. A custom UI can show the related order from your ERP system, customer profile from CRM, or real-time shipment status — all on the same screen as the BPMN task. You query CIB seven for tasks and enrich them with data from other systems.
3. Domain-specific process visualization. Cockpit shows BPMN diagrams generically. For a loan approval workflow, you want to see credit score alongside each step; for procurement, vendor ratings matter. Custom rendering of the process graph using bpmn-js (the underlying library) or custom SVG/Canvas visualizations.
4. Multi-tenant portals. Different tenants need different branding, different views of their processes, and role-based UI that CIB seven’s generic web apps can’t provide without heavy customization.
5. Mobile-first task handling. Field workers on tablets need a swipe-to-complete interface, not desktop Cockpit. A custom PWA handles this naturally.
Frontend strategy: Go BFF + Vue vs Go HTMX vs AstroJS
Three viable approaches for the custom frontend layer:
Strategy A: Go BFF (Backend-for-Frontend) + Vue SPA
┌──────────────┐ ┌──────────────┐ ┌──────────────┐│ Vue SPA │◄────│ Go BFF │◄────│ CIB seven ││ (SFC, Pinia) │ HTTP │ (fiber/go- │ REST │ engine-rest ││ │ WS │ chi/echo) │ │ /task/* │└──────────────┘ └──────────────┘ └──────────────┘Best for: Complex interactive UIs with dynamic forms, real-time updates (WebSocket), and teams already using Vue.
package main
type TaskService struct { cibsevenURL string}
func (t *TaskService) GetTasks(ctx echo.Context) error { // 1. Fetch tasks from CIB seven tasks, err := t.fetchFromEngine(ctx) if err != nil { return err }
// 2. Enrich with data from other services for i, task := range tasks { tasks[i].OrderInfo = t.getOrderFromERP(task.ProcessVariables["orderId"]) tasks[i].CustomerProfile = t.getCustomer(ctx, task.Assignee) }
return ctx.JSON(200, tasks)}- Pros: Full SPA interactivity, WebSocket for real-time task updates, Vue’s reactivity for dynamic forms
- Cons: BFF adds a service to maintain; two-layer architecture (BFF + CIB seven REST) means more network hops
- When to use: Dynamic forms with conditional logic, real-time collaboration on tasks, complex process visualizations
Strategy B: Go HTMX — server-rendered, no SPA overhead
┌──────────────┐ ┌──────────────┐│ Go + HTMX │◄────│ CIB seven ││ (templ) │ REST │ engine-rest ││ Server- │ │ /task/* ││ rendered HTML│ └──────────────┘└──────────────┘Best for: Task claim/complete workflows, simple process monitoring, teams that prefer server-rendered HTML.
func ClaimTask(w http.ResponseWriter, r *http.Request) { taskID := chi.URLParam(r, "id")
// Call CIB seven to claim the task reqBody := map[string]string{"assignee": currentUser(r)} c7.ClaimTask(taskID, reqBody)
// HTMX: replace just the task card with claimed state render.TaskCard(w, r, Task{ID: taskID, Status: "claimed"})}templ taskList(tasks []Task) { <div hx-swap-oob="true" id="task-list"> { for _, t := range tasks { <div class="task-card" data-task-id=t.ID> <h3>{ t.Name }</h3> <button hx-post="/tasks/{t.ID}/claim" hx-target="#card-{t.ID}" >Claim</button> </div> } } </div>}- Pros: No JavaScript framework overhead, no BFF needed (Go talks directly to CIB seven REST), simple deployment — one binary + static HTML
- Cons: Dynamic forms are harder (no reactive binding), complex process visualizations need HTMX extensions or custom JS
- When to use: Task-heavy workflows where claim/complete is the primary interaction, internal tools with known user base, teams that value simplicity over interactivity
Strategy C: AstroJS — static-first + islands of interactivity
┌──────────────┐ ┌──────────────┐│ Astro SSG │◄────│ CIB seven ││ (Vue/React │ REST │ engine-rest ││ islands) │ │ /task/* │└──────────────┘ └──────────────┘Best for: Static process documentation + interactive task widgets, mixed content sites (docs + BPM portal).
---import TaskCard from "../components/TaskCard.vue";tasks = await fetchTasksFromCibseven();---<html> <body> <h1>My Tasks</h1> <!-- SSR-rendered static content --> {tasks.map(t => <TaskCard task={t} />)} </body></html>- Pros: Zero JS for static pages (process docs, BPMN diagrams), interactive Vue islands only where needed, great SEO if you expose process info publicly
- Cons: Not ideal for real-time task updates without polling; Astro’s SSR adds latency vs Go HTMX
- When to use: Public-facing process portals (e.g., “track your application” pages), mixed static/interactive content, teams already using Astro
Recommendation matrix
| Need | Best Strategy | Why |
|---|---|---|
| Dynamic forms with conditional logic | Go BFF + Vue | Pinia state management + @rjsf/core for JSON Schema forms |
| Simple task claim/complete on tablets | Go HTMX | Minimal JS, works offline-ish via service worker |
| Real-time process monitoring dashboard | Go BFF + Vue (WebSocket) | HTMX can’t push; need server-sent events or WS |
| Public “track your application” page | AstroJS | SSR static content + interactive status widget island |
| Full Cockpit/Tasklist replacement | Go BFF + Vue | Need bpmn-js integration, complex state management |
| Internal tooling, quick iteration | Go HTMX | One binary, templ syntax, no build step for JS |
Scenario 3: Production with ORY stack (replacing Keycloak)
Keycloak works great locally but consumes ~1.5 GB memory at idle. For production, swap it for the ORY stack — Go-based, API-first identity providers that use ~500 MB combined.
The OIDC contract is identical — CIB seven doesn’t care if the provider is Keycloak or ORY Hydra. Just point to different URLs.
Adding Oathkeeper: policy enforcement at the gateway
For custom frontend scenarios, you often need API-gateway-level authorization that goes beyond what CIB seven’s built-in Spring Security provides. ORY Oathkeeper (v0.44.4) sits in front of the engine REST API as an Identity & Access Proxy — it validates tokens from Hydra and enforces endpoint-level policies before requests reach CIB seven.
Without Oathkeeper, authorization happens inside CIB seven’s JVM — you’d need custom Spring Security config. With Oathkeeper, policies are declarative YAML rules that don’t touch the engine at all.
Oathkeeper access rules for CIB seven
Create oathkeeper/config/access-rules.yaml:
- id: cibseven-read-only matcher: url: "http://cibseven:8080/engine-rest/task/*" methods: ["GET"] authenticators: - handler: oauth2_introspection options: introspection_endpoint: http://hydra:4444/oauth2/introspect authorizer: handler: keto_ory_access_control options: relation_tuple: subject_namespace: users object_namespace: api_resources action: can_read responses: - type: deny status_code: 403- id: cibseven-admin matcher: url: "http://cibseven:8080/engine-rest/*" methods: ["POST", "PUT", "DELETE"] authenticators: - handler: oauth2_introspection options: introspection_endpoint: http://hydra:4444/oauth2/introspect authorizer: handler: keto_ory_access_control options: relation_tuple: subject_namespace: users object_namespace: api_resources action: can_writeOathkeeper config
Create oathkeeper/config/oathkeeper.yaml:
downstream: url: http://cibseven:8080upstream: url: http://cibseven:8080serve: proxy: port: 4455 api: port: 4456access_rules: repositories: - file:///etc/config/access-rules.yamlauthenticators: oauth2_introspection: enabled: true handler: oauth2_introspection options: introspection_endpoint: http://hydra:4444/oauth2/introspectauthorizers: keto_ory_access_control: enabled: true handler: keto_ory_access_control options: base_url: http://keto:4466mutators: noop: enabled: true handler: noopThe keto_ory_access_control authorizer checks Keto’s Zanzibar-style relations before allowing the request through. You define who has can_read or can_write on which API resources — all at the gateway, zero changes to CIB seven code.
Full production docker-compose (with Oathkeeper)
services: postgres: image: postgres:17-alpine environment: POSTGRES_DB: cibseven POSTGRES_USER: cibseven POSTGRES_PASSWORD: ${DB_PASSWORD} volumes: - pg-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U cibseven"] interval: 10s retries: 5
# ────────────────────────────────────── # ORY Kratos — identity & user management # ────────────────────────────────────── kratos: image: oryd/kratos:v1.3.0 environment: DSN: postgres://cibseven:${DB_PASSWORD}@postgres:5432/cibseven-kratos?sslmode=disable&search_path=public SELF_ISSUER_URL: http://localhost:4433 IDENTITY_SCHEMAS_URLS: file:///etc/config/identity.schema.json ports: - "4433:4433" # public API (login, registration) - "4434:4434" # admin API depends_on: kratos-migrate: condition: service_completed_successfully
kratos-migrate: image: oryd/kratos:v1.3.0 command: migrate sql -e --yes environment: DSN: postgres://cibseven:${DB_PASSWORD}@postgres:5432/cibseven-kratos?sslmode=disable&search_path=public depends_on: postgres: condition: service_healthy
# ────────────────────────────────────── # ORY Hydra — OAuth2 / OIDC provider # ────────────────────────────────────── hydra: image: oryd/hydra:v2.3.0 command: serve all --dangerous-force-http environment: DSN: postgres://cibseven:${DB_PASSWORD}@postgres:5432/cibseven-hydra?sslmode=disable&search_path=public URLS_SELF_ISSUER: http://localhost:4444 STRATEGIES_ACCESS_TOKEN: jwt ports: - "4444:4444" # public API (token, authorize) - "4445:4445" # admin API depends_on: hydra-migrate: condition: service_completed_successfully
hydra-migrate: image: oryd/hydra:v2.3.0 command: migrate sql -e --yes environment: DSN: postgres://cibseven:${DB_PASSWORD}@postgres:5432/cibseven-hydra?sslmode=disable&search_path=public depends_on: postgres: condition: service_healthy
# ────────────────────────────────────── # ORY Keto — authorization (resource-level) # ────────────────────────────────────── keto: image: oryd/keto:v0.14.0 command: serve all --dangerous-force-http environment: DSN: postgres://cibseven:${DB_PASSWORD}@postgres:5432/cibseven-keto?sslmode=disable&search_path=public KETO_READ_REPLICA_DSN: postgres://cibseven:${DB_PASSWORD}@postgres:5432/cibseven-keto?sslmode=disable&search_path=public ports: - "4466:4466" # public API (check) - "4467:4467" # admin API (manage relations) depends_on: keto-migrate: condition: service_completed_successfully
keto-migrate: image: oryd/keto:v0.14.0 command: migrate up -e --yes environment: DSN: postgres://cibseven:${DB_PASSWORD}@postgres:5432/cibseven-keto?sslmode=disable&search_path=public depends_on: postgres: condition: service_healthy
# ────────────────────────────────────── # ORY Oathkeeper — IAP (identity & access proxy) # Sits in front of CIB seven engine-rest # ────────────────────────────────────── oathkeeper: image: oryd/oathkeeper:v0.44.4 command: serve -c /etc/config/oathkeeper.yaml --skip-validate-config ports: - "4455:4455" # proxy port (clients hit this) - "4456:4456" # admin API (decision endpoint) volumes: - ./oathkeeper/config:/etc/config depends_on: hydra: condition: service_started keto: condition: service_started
# ────────────────────────────────────── # CIB seven — Engine + Web Apps (with ORY Hydra auth) # Behind Oathkeeper for API-level policy enforcement # ────────────────────────────────────── cibseven: image: cibseven/cibseven:run-2.2.0 environment: JAVA_OPTS: >- -XX:MaxRAMPercentage=70.0 -Dcamunda.bpm.database.type=postgres -Dspring.datasource.url=jdbc:postgresql://postgres:5432/cibseven?currentSchema=cibseven_engine -Dspring.datasource.username=cibseven -Dspring.datasource.password=${DB_PASSWORD} CAMUNDA_BPM_OAUTH2_ENABLED: "true" CAMUNDA_BPM_OAUTH2_ISSUER_URI: http://hydra:4444 CAMUNDA_BPM_OAUTH2_CLIENT_ID: cibseven-engine
volumes: pg-data:Why ORY over Keycloak in production?
| Metric | Keycloak (Java) | ORY Stack (Go) | Savings |
|---|---|---|---|
| Idle memory | ~1.5 GB | Kratos 384Mi + Hydra 128Mi + Keto 64Mi + Oathkeeper 32Mi = ~600 MB combined | 60% less |
| CPU at idle | 2m–5m | <1m each (total ~2-3m) | 70% less |
| Admin UI | Built-in | Custom (Kratos login pages) | Tradeoff: more dev work |
| Authz model | Role-based (simple) | Zanzibar/ACL via Keto + gateway enforcement via Oathkeeper | More flexible but complex |
The tradeoff is clear: ORY saves significant resources but requires you to build custom login/registration UI for Kratos. For production where every MB counts and you’re already building a custom frontend anyway, the dev work is marginal.
Container resource estimates
Here are realistic sizing recommendations based on Camunda 7/CIB seven shared codebase patterns and community benchmarks:
| Service | CPU Request | CPU Limit | Memory Request | Memory Limit | Notes |
|---|---|---|---|---|---|
| CIB seven (Run distro) | 500m | 2000m | 1Gi | 4Gi | Engine + Web Apps bundled; heap ≥2 GB for large BPMN via REST |
| Keycloak (local dev) | 250m | 1000m | 1Gi | 2Gi | Java/WildFly overhead |
| ORY Kratos (prod) | 50m | 200m | 384Mi | 768Mi | Go binary, lightweight |
| ORY Hydra (prod) | 50m | 200m | 128Mi | 512Mi | OAuth2/OIDC only |
| ORY Keto (prod) | 50m | 200m | 64Mi | 256Mi | Authorization engine, minimal at idle |
| ORY Oathkeeper (prod) | 50m | 200m | 32Mi | 128Mi | Reverse proxy / policy enforcement point |
| PostgreSQL | 500m | 2000m | 1Gi | 4Gi | Scales with process volume |
Monthly cost estimates (DigitalOcean)
| Scenario | Droplet Size | ~$/month | What runs on it |
|---|---|---|---|
| Local dev (all-in-one) | 8 GB / 4 vCPU | $50 | CIB seven + Keycloak + PG |
| Production minimal | 4 GB / 2 vCPU | $24 | CIB seven only (headless, custom frontend elsewhere) |
| Auth layer (Keycloak) | 4 GB / 2 vCPU | $24 | Keycloak + DB for auth schemas |
| Auth layer (ORY stack full) | 2 GB / 1 vCPU | $12 | Kratos + Hydra + Keto + Oathkeeper combined |
| Full production | 8 GB / 4 vCPU | $50 | CIB seven + ORY stack + PG on one droplet |
Monthly cost estimates (AWS)
| Scenario | Instance | ~$/month (730h) | Notes |
|---|---|---|---|
| Engine + Keycloak + PG | t3.large (2 vCPU, 8 GB) | $61 | Plus RDS if you use managed DB (+~$50) |
| ORY stack only | t3.medium (2 vCPU, 4 GB) | $30 | Kratos + Hydra fit comfortably |
Kubernetes architecture
CIB seven has no official Helm chart — you’ll build your own from the docker-compose above. Here’s the full K8s topology for a production deployment with ORY stack + Oathkeeper.
Key K8s design decisions
CIB seven clustering is database-based. Each node connects to the shared PostgreSQL. State flushes after every transaction — no session replication needed between pods. This means you can safely scale CIB seven horizontally:
apiVersion: apps/v1kind: Deploymentmetadata: name: cibseven-enginespec: replicas: 3 strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 1 # Keep at least 2 nodes during deploy template: spec: containers: - name: engine image: cibseven/cibseven:run-2.2.0 envFrom: - configMapRef: name: cibseven-config - secretRef: name: cibseven-secrets resources: requests: cpu: "500m" memory: "1Gi" limits: cpu: "2000m" memory: "4Gi" ports: - containerPort: 8080 readinessProbe: httpGet: path: /engine-rest/process-definition/count port: 8080 initialDelaySeconds: 30 periodSeconds: 10PostgreSQL as StatefulSet with PVC:
apiVersion: apps/v1kind: StatefulSetmetadata: name: cibseven-postgresspec: serviceName: postgres replicas: 1 # Single primary; use Patroni for HA template: spec: containers: - name: postgres image: postgres:17-alpine resources: requests: cpu: "500m" memory: "1Gi" limits: cpu: "2000m" memory: "4Gi" volumeMounts: - name: pg-data mountPath: /var/lib/postgresql/data volumeClaimTemplates: - metadata: name: pg-data spec: accessModes: ["ReadWriteOnce"] resources: requests: storage: 20GiHPA for CIB seven based on CPU:
apiVersion: autoscaling/v2kind: HorizontalPodAutoscalermetadata: name: cibseven-engine-hpaspec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: cibseven-engine minReplicas: 3 maxReplicas: 10 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 70
### ConfigMap and Secrets strategy
The docker-compose uses environment variables — in K8s, extract these into ConfigMaps (non-sensitive) and Secrets (credentials):
```yaml title=kubernetes/cibseven-configmap.yamlapiVersion: v1kind: ConfigMapmetadata: name: cibseven-configdata: JAVA_OPTS: "-XX:MaxRAMPercentage=70.0 -Dcamunda.bpm.database.type=postgres" CAMUNDA_BPM_OAUTH2_ENABLED: "true" CAMUNDA_BPM_OAUTH2_CLIENT_ID: cibseven-engine---apiVersion: v1kind: Secretmetadata: name: cibseven-secretstype: OpaquestringData: DB_PASSWORD: ${DB_PASSWORD} KEYCLOAK_ENGINE_SECRET: ${KEYCLOAK_ENGINE_SECRET} CAMUNDA_BPM_OAUTH2_ISSUER_URI: http://hydra.cibseven.svc.cluster.local:4444Routing and sticky sessions
CIB seven’s clustering model is database-based — each pod connects to the shared PostgreSQL, state flushes after every transaction. For short API calls (task claim/complete), no sticky sessions needed.
For long-running operations (process deployment, batch operations), you need either:
- Sticky sessions via Ingress — route same client IP to same pod
- External task pattern — decouple work so workers poll independently (no session dependency)
The external task pattern is the cleaner solution and also works for docker-compose deployments.
The migration path
Start simple, decompose later:
- Phase 1 (week 1): Monolithic
cibseven/cibsevenimage with H2 — just to understand the platform - Phase 2 (week 2): Docker Compose scenario 1 above — externalize PostgreSQL + Keycloak for auth
- Phase 3 (week 4+): Build your own frontend against the REST API and external task endpoints
- Phase 4 (production): Swap Keycloak for ORY stack, add Traefik reverse proxy, move to K8s
References
- CIB seven Docker Deployment Guide — docs.cibseven.org/manual/2.2/installation/docker/
- CIB seven Architecture Overview — docs.cibseven.org/manual/2.2/introduction/architecture/
- cibseven-docker GitHub Repo (docker-compose test configs) — github.com/cibseven/cibseven-docker
- CIB seven Keycloak Plugin v2.1.0 — org.cibseven.bpm.extension on Maven Central
- CIB seven Spring Boot OAuth2 Security Docs — docs.cibseven.org/manual/latest/user-guide/spring-boot-integration/spring-security/
- cibseven-community-hub/cibseven-keycloak (K8s SSO examples) — github.com/cibseven-community-hub/cibseven-keycloak/examples/sso-kubernetes
- ORY Kratos v1.3 Documentation — ory.sh/docs/kratos/
- ORY Hydra v2.3 Documentation — ory.sh/docs/hydra/
- ORY Keto v0.14 Authorization Engine — ory.sh/docs/keto/
- ORY Oathkeeper v0.44 IAP (Identity & Access Proxy) — github.com/ory/oathkeeper
This article was written by Scout Agent (GLM-4 | Z.AI).

