Skip to content

Commit b0d1054

Browse files
k1n6b0bclaude
andcommitted
docs: replace Watchtower with host cron pull model
- README: cron pull deployment (Step 5), fix architecture diagram - README: generic service account email placeholder - docker-compose.yml: remove Watchtower, add cron comment Watchtower incompatible with userns-remap on frame; host cron (*/5 * * * *) is the recommended alternative. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e316077 commit b0d1054

2 files changed

Lines changed: 15 additions & 30 deletions

File tree

README.md

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Hive76 WordPress site, and Eventbrite events.
2727
5. Create and download a JSON key:
2828
- Click the service account → Keys → Add Key → Create new key → JSON
2929
- Save as `config/service-account.json` in this directory
30-
6. Note the service account **email address** (looks like `beebot-sync@hive76-beebot.iam.gserviceaccount.com`)
30+
6. Note the service account **email address** (looks like `beebot-sync@YOUR-PROJECT-ID.iam.gserviceaccount.com`)
3131

3232
### Share the Drive folder with the service account
3333

@@ -132,28 +132,21 @@ docker logs -f beebot
132132

133133
---
134134

135-
## Step 5 — Automatic Updates (Watchtower)
135+
## Step 5 — Automatic Updates (Cron Pull)
136136

137137
BeeBot uses a pull-based deployment model. When commits are merged to `main`,
138138
GitHub Actions builds a new image and pushes it to
139-
`ghcr.io/hive76/beebot:latest`. Watchtower on the host polls for new images
140-
and restarts the container automatically — no SSH access from CI required.
141-
142-
Add Watchtower to your host's `docker-compose.yml` (or run it separately):
143-
144-
```yaml
145-
watchtower:
146-
image: containrrr/watchtower
147-
restart: unless-stopped
148-
volumes:
149-
- /var/run/docker.sock:/var/run/docker.sock
150-
- /root/.docker/config.json:/config.json:ro # for GHCR auth
151-
command: --interval 300 beebot # poll every 5 min, watch beebot only
139+
`ghcr.io/hive76/beebot:latest`. A host cron job polls for new images and
140+
restarts the container — no SSH access from CI required.
141+
142+
Add to crontab on the host (`crontab -e`):
143+
144+
```bash
145+
# Pull and redeploy beebot every 5 minutes (no-op if image hasn't changed)
146+
*/5 * * * * cd /opt/beebot && docker compose pull beebot --quiet && docker compose up -d --no-deps beebot >> /var/log/beebot-update.log 2>&1
152147
```
153148

154-
To authenticate Watchtower with GHCR, create a GitHub PAT with `read:packages`
155-
scope and run `docker login ghcr.io` on the host — Watchtower picks up the
156-
stored credentials automatically.
149+
Since `ghcr.io/hive76/beebot` is a public image, no GHCR authentication is needed.
157150

158151
---
159152

@@ -256,5 +249,5 @@ Google Drive (HiveBot Docs folder)
256249
GitHub (hive76/beebot)
257250
└── GitHub Actions CI (test + secret scan on PRs)
258251
└── GHCR (ghcr.io/hive76/beebot:latest)
259-
└── Watchtower on host (polls, pulls, restarts)
252+
└── host cron (polls every 5 min, pulls, restarts)
260253
```

docker-compose.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ services:
2323
max-file: "5"
2424

2525
healthcheck:
26-
test: ["CMD", "pgrep", "-f", "beebot.py"]
26+
test: ["CMD", "sh", "-c", "kill -0 1"]
2727
interval: 30s
2828
timeout: 10s
2929
retries: 3
@@ -50,16 +50,8 @@ services:
5050

5151
command: ["python", "sync/sync_docs.py"]
5252

53-
# Watchtower — polls GHCR every 5 minutes, pulls new image, restarts beebot
54-
# Requires: docker login ghcr.io on the host (PAT with read:packages scope)
55-
watchtower:
56-
image: containrrr/watchtower
57-
container_name: watchtower
58-
restart: unless-stopped
59-
volumes:
60-
- /var/run/docker.sock:/var/run/docker.sock
61-
- /root/.docker/config.json:/config.json:ro
62-
command: --interval 300 beebot
53+
# Auto-update: image pulls are handled by a host cron job (see README Step 5)
54+
# This avoids Docker socket permission issues with userns-remap.
6355

6456
volumes:
6557
beebot_data:

0 commit comments

Comments
 (0)