-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (78 loc) · 3.52 KB
/
Copy pathdocker-compose.yml
File metadata and controls
80 lines (78 loc) · 3.52 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
networks:
web:
internal:
services:
traefik:
image: traefik:v3
restart: unless-stopped
networks: [web, internal]
command:
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.docker.network=internal
- --providers.file.directory=/dynamic
- --providers.file.watch=true
- --entrypoints.websecure.address=:443
- --entrypoints.web.address=:80
- --certificatesresolvers.le.acme.email=${CLAYDE_GIT_EMAIL}
- --certificatesresolvers.le.acme.storage=/letsencrypt/acme.json
- --certificatesresolvers.le.acme.httpchallenge=true
- --certificatesresolvers.le.acme.httpchallenge.entrypoint=web
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data/letsencrypt:/letsencrypt
# Hand-written routes for host services that are not containers here
# (the /board and /walk backends on the host).
- ./traefik-dynamic:/dynamic:ro
clayde:
image: ghcr.io/claydecode/me:main
restart: unless-stopped
user: "1000:1000"
# The host's docker group, so the mounted socket below is usable as uid
# 1000. Must match `getent group docker` on the host.
group_add:
- "${DOCKER_GID:-111}"
networks: [internal]
expose:
- "8080"
environment:
- CLAYDE_ENABLED=true
volumes:
- ./data:/data
# Dedicated Claude config dir for the container (required when
# CLAYDE_CLAUDE_BACKEND=cli). Use a SEPARATE login here — see README:
# CLAUDE_CONFIG_DIR=~/clayde-claude claude login
# Mount the DIRECTORY, not the single .credentials.json file: the CLI
# refreshes its short-lived OAuth token via atomic rename (new inode),
# which a single-file bind mount pins to the stale inode at start —
# causing "authentication expired" until the stack is restarted. A
# directory mount resolves the path live, so refreshes are picked up.
- ~/clayde-claude:/home/clayde/.claude
# Pebble skill directories — mount one or more host dirs read-only
# under /skills/. Subdirectory layout is free; discovery is recursive.
- ~/skills/personal:/skills/personal:ro
- ~/skills/shared:/skills/shared:ro
# Whole personal skill library, read-only — lets scheduled tasks (and
# Pebble requests) use any skill from the knowledge base, e.g. ntfy-ping
# for an intentional success notification.
- ~/knowledge_base/skills:/skills/kb:ro
# Pebble knowledge-base working directory — Syncthing on the host
# handles cross-device sync; container performs no git on the KB.
- ~/knowledge_base:/home/clayde/knowledge_base
# Scheduled-task markdown files (cron/at frontmatter). Read-write: the
# scheduler moves fired one-off files into a done/ subdirectory.
- ~/clayde-tasks:/tasks
# Docker CLI access for agent runs that need to resolve images, e.g. the
# app-repository update pass and its `docker compose pull --dry-run`.
# Full socket: an agent in this container can control every container on
# the host. Deliberate, and the reason the whitelist above matters.
- /var/run/docker.sock:/var/run/docker.sock
labels:
- "traefik.enable=true"
- "traefik.http.routers.clayde.rule=Host(`${CLAYDE_PEBBLE_HOST}`) && PathPrefix(`/webhook`)"
- "traefik.http.routers.clayde.entrypoints=websecure"
- "traefik.http.routers.clayde.tls.certresolver=le"
- "traefik.http.services.clayde.loadbalancer.server.port=8080"