Skip to content

Commit a8a0107

Browse files
strandedturtleclaude
andcommitted
docs: add ready-to-paste "Add to an existing Compose stack" section
Lead the deployment docs with the prebuilt GHCR image (ghcr.io/strandedturtle/diupdater:edge): a copy-paste compose service block with env, the same-path stacks mount, and a data volume, so it drops into an existing stack (e.g. alongside Diun) without cloning or building. Documents image tags (edge/latest/semver) and how to make the GHCR package public. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Lj6nYJQDtLaZFvvEQJGM4
1 parent 17b936c commit a8a0107

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ never automatically** (no watchtower-style surprise upgrades).
2020
- [How it works](#how-it-works)
2121
- [Requirements](#requirements)
2222
- [Quick start](#quick-start)
23+
- [Add to an existing Compose stack](#add-to-an-existing-compose-stack)
2324
- [Step-by-step setup](#step-by-step-setup)
2425
- [1. Get the code onto your server](#1-get-the-code-onto-your-server)
2526
- [2. Create your `.env`](#2-create-your-env)
@@ -101,6 +102,64 @@ and open `http://<host-ip>:5000`.
101102

102103
---
103104

105+
## Add to an existing Compose stack
106+
107+
If you already manage stacks with Docker Compose (or Dockge), the quickest path
108+
is the **prebuilt image** — no cloning, no building. Drop this service into an
109+
existing compose file (e.g. the `management` stack alongside Diun) and fill in
110+
the three secrets:
111+
112+
```yaml
113+
services:
114+
diun-updater:
115+
image: ghcr.io/strandedturtle/diupdater:edge
116+
container_name: diun-updater
117+
restart: unless-stopped
118+
ports:
119+
- "5000:5000"
120+
environment:
121+
- ADMIN_PASSWORD=change-me # your login password
122+
- SESSION_SECRET=REPLACE_ME # openssl rand -hex 32
123+
- DIUN_WEBHOOK_TOKEN=REPLACE_ME # openssl rand -hex 32
124+
- STACKS_DIR=/home/youruser/docker/stacks # absolute host path to your stacks
125+
volumes:
126+
- /var/run/docker.sock:/var/run/docker.sock
127+
# ⚠️ SAME absolute path on the host AND inside the container — otherwise
128+
# relative bind mounts in your other stacks break on recreate.
129+
- /home/youruser/docker/stacks:/home/youruser/docker/stacks
130+
- diun-updater-data:/data
131+
132+
volumes:
133+
diun-updater-data:
134+
```
135+
136+
Generate the two secrets (`openssl rand -hex 32` each), then start just this
137+
service:
138+
139+
```bash
140+
docker compose up -d diun-updater
141+
```
142+
143+
Finish by adding the Diun webhook notifier ([step 5](#5-point-diun-at-the-app-the-webhook)),
144+
making sure Diun and `diun-updater` share a Docker network ([step 6](#6-put-them-on-the-same-network)),
145+
then open `http://<host-ip>:5000`.
146+
147+
**Image tags:** `:edge` tracks the latest commit on `main`; cutting a release
148+
tag (`git tag v0.1.0 && git push origin v0.1.0`) also publishes `:latest` and
149+
semver tags (`:0.1.0`, `:0.1`). Pin to a version for stability.
150+
151+
> **Can't pull the image?** The GHCR package inherits the repo's visibility. To
152+
> let other hosts/people pull it without auth, make the package public: GitHub →
153+
> your avatar → **Packages** → `diupdater` → **Package settings** → **Change
154+
> visibility** → *Public*. Otherwise run `docker login ghcr.io` (with a PAT that
155+
> has `read:packages`) on each host first.
156+
157+
The [same-path mount](#3-configure-the-compose-file) and
158+
[Docker-socket](#security-notes-read-this) warnings apply here too. Prefer to
159+
build from source? Use [Step-by-step setup](#step-by-step-setup) below instead.
160+
161+
---
162+
104163
## Step-by-step setup
105164

106165
### 1. Get the code onto your server

0 commit comments

Comments
 (0)