-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (56 loc) · 2.28 KB
/
Copy pathdocker-compose.yml
File metadata and controls
58 lines (56 loc) · 2.28 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
services:
hamroh-init:
# Pre-create ./access.json and ./plugins.json from their .example
# files if they don't exist.
image: alpine:3.19
volumes:
- ./:/host
command: >
sh -c '
if [ -f /host/access.json ]; then
echo "[hamroh-init] access.json already present on host, leaving it alone"
else
cp /host/access.json.example /host/access.json
echo "[hamroh-init] seeded access.json from access.json.example"
fi
if [ -f /host/plugins.json ]; then
echo "[hamroh-init] plugins.json already present on host, leaving it alone"
else
cp /host/plugins.json.example /host/plugins.json
echo "[hamroh-init] seeded plugins.json from plugins.json.example"
fi
'
hamroh:
build: .
restart: on-failure
env_file: .env
depends_on:
hamroh-init:
condition: service_completed_successfully
volumes:
# Persistent data: SQLite, memories, session_id, cc_logs
- ./data:/app/data
# Prompt files. Mounted as a directory (not a single-file mount)
# so the bot's `append_instructions` tool can rename(2)-replace
# project.md atomically — single-file bind mounts return EBUSY
# on rename. Writable so the bot can update project.md;
# system.md is git-tracked, and no tool targets it.
- ./prompts:/app/prompts
# Skill playbooks — bind-mounted read-only so edits are live without
# a rebuild. The image also has a copy baked in (Dockerfile), this
# overlays it.
- ./skills:/app/skills:ro
# Claude Code auth + session files (pre-authenticate on host first)
- ~/.claude:/root/.claude
- ~/.claude.json:/root/.claude.json
# Access policy — single-file bind mount so /allow, /deny, /dmpolicy
# mutations from Telegram persist across restarts. The hamroh-init
# sidecar above guarantees the host file exists before this mount is
# set up.
- ./access.json:/app/access.json
# Plugin config — bind-mounted so host edits apply on restart without
# needing --build. Read once at boot. hamroh-init seeds it.
- ./plugins.json:/app/plugins.json
working_dir: /app
# Graceful shutdown: give CC subprocess time to save state
stop_grace_period: 15s