-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
30 lines (29 loc) · 1.14 KB
/
Copy pathdocker-compose.yml
File metadata and controls
30 lines (29 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
services:
cmdb:
image: ghcr.io/osaljehani/homelab-cmdb:latest
build: .
ports:
- "8080:8080"
volumes:
- ./data:/data
- ./inventory/ansible.cfg:/app/ansible.cfg:ro
- ${SSH_PRIVATE_KEY:-/dev/null}:/run/secrets/ssh_key:ro
environment:
- CMDB_DB_PATH=/data/cmdb.db
# No CMDB_ANSIBLE_INVENTORY: Collect generates the inventory from the database
# (every known host) and injects these SSH vars. Set CMDB_ANSIBLE_INVENTORY or
# upload a file on the Collect page to override per run.
- CMDB_ANSIBLE_USER=${ANSIBLE_USER}
- CMDB_SSH_PRIVATE_KEY=/run/secrets/ssh_key
restart: unless-stopped
# Demo mode: a populated fictional fleet, no setup required.
# docker compose --profile demo up cmdb-demo
# No --db / CMDB_DB_PATH here: `cmdb demo` defaults to <tempdir>/cmdb-demo.db
# (in-container /tmp, not the ./data volume) and auto-wipes only that default
# path — so restarts reseed cleanly and a real cmdb.db is never touchable.
cmdb-demo:
build: .
profiles: ["demo"]
ports:
- "8080:8080"
entrypoint: ["uv", "run", "cmdb", "demo", "--host", "0.0.0.0"]