Mount host repositories for Docker execution with host user ownership

This commit is contained in:
2026-10-10 01:22:02 +01:00
parent 7565693957
commit 68042aad5d
10 changed files with 161 additions and 12 deletions
+9 -3
View File
@@ -102,6 +102,10 @@ both, and never puts the token in model prompts, outputs, or diagnostics.
```sh
docker compose build pipelines
docker compose stop --timeout 60 pipelines
# Default managed volumes only; never substitute a host bind mount for these paths.
docker compose run --rm --no-deps --user 0:0 --entrypoint sh pipelines -c \
'chown -R "$PIPELINES_UID:$PIPELINES_GID" /data /home/pipelines /workspace'
docker compose run --rm --no-deps --entrypoint opencode pipelines auth login
docker compose up -d
docker compose logs -f pipelines
@@ -109,9 +113,11 @@ docker compose logs -f pipelines
Select your preferred provider and follow its authentication flow. Credentials are stored
in the dedicated `opencode-home` volume, separate from your host account. These
container commands are **not tested** here. The image includes Go/git for the
existing narrowly approved verification tools; the actual server runs as uid 10001.
The Docker workspace is persistent and separate from your host checkout.
interactive login is **not tested** in this regression. The Docker workspace/UID
checks were executed with the actual image and a mocked stage. The image includes
Go/git; installer-configured servers use the host user's UID/GID. The home and
installation checkout are bound at their original paths so runs edit the real
checkout, not the separate persistent image workspace at `/workspace`.
Connect the native TUI:
+15
View File
@@ -45,6 +45,21 @@ checks ntfy health through Pipelines, and sends an authenticated test notificati
It does not register an OS service, delete volumes, or seed pipeline definitions.
Phone reception is not verified by installation.
Docker setup mounts the host user's home and the installation checkout at their
original absolute paths, and runs Pipelines/OpenCode using that host user's UID
and GID. This makes a client invocation directory such as
`/home/tank/repos/pipelines` refer to the actual host checkout rather than an
unavailable container path or the unrelated image checkout at `/workspace`.
Stage permissions/edit scopes still apply; this is a filesystem mount, not a
workspace allowlist or automatic file transfer from another client computer.
For repositories outside those mounts, add a Compose bind at the same absolute
path. Reinstallation stops the old Pipelines service before changing ownership
of its managed data/auth/workspace volumes. It never recursively chowns the host
home/repository, deletes credentials, or removes volumes. Existing data/auth
volumes use `nocopy` so Docker cannot reset a freshly prepared empty volume's
ownership to the image UID. Setup verifies that the server can enter the host
checkout before reporting completion.
For fresh configuration you can supply `--ntfy-url https://ntfy.example.com
--bind-address 127.0.0.1 --timezone Europe/London --port 8081` directly to `./install.sh`.
The defaults are ready for direct phone access on your trusted LAN. Only use
+28 -3
View File
@@ -92,9 +92,9 @@ access. Prefer a dedicated publishing user with write-only access to this topic.
The root `compose.yaml` runs **both the pipeline server and ntfy** with persistent
volumes, internal service networking, and a private topic. See the
[Docker + Android setup](docker.md) for bootstrap, credentials, and timezone
detection. The previous ntfy-only Compose file has been replaced. Docker's daemon
was unavailable; deployment is **not tested**. HTTP integration tests use an
ntfy-compatible test server, not a running ntfy instance.
detection. The previous ntfy-only Compose file has been replaced. Isolated real
Docker health and publishing checks have passed; phone reception and the user's
remote Tailscale connectivity remain **not tested** locally.
Use a TLS reverse proxy or a private VPN (e.g. Tailscale). A phone cannot reach
your computer's `127.0.0.1`; that address is only for local publishing/proxying.
@@ -106,6 +106,31 @@ server is another container, localhost is that container, not the ntfy host.
## Phone
### Tailscale address times out while LAN works
Use `http://<server-Tailscale-IP>:8090`, not port 80; enable Tailscale on both the
server and phone. The default Compose mapping binds ntfy to `0.0.0.0:8090`.
Binding to all interfaces does not bypass tailnet grants/ACLs, host firewalls,
or Docker forwarding rules. A timeout alone cannot identify which is blocking.
Do not disable firewalls or publicly forward this port as a workaround.
On the server, these are read-only diagnostics (the remote checks are not tested
from this development machine):
```sh
tailscale status
docker compose port ntfy 80
curl --connect-timeout 5 http://127.0.0.1:8090/v1/health
curl --connect-timeout 5 "http://$(tailscale ip -4):8090/v1/health"
```
If the host health checks succeed but the phone times out, check that the phone
is in the intended tailnet and that tailnet access rules/firewalls allow this
phone to reach server TCP 8090. Once reachable, log in as `phone-reader` for the
Tailscale server entry, separately from the LAN entry. Set `NTFY_BASE_URL` to a
phone-reachable address if attachment URLs currently point to a LAN-only address;
that setting is not a substitute for fixing a TCP timeout.
Install the ntfy app, add your own server, authenticate with the reader account,
and subscribe to `anime`. Ensure notifications and required background operation
are allowed. Outside your home network, both topic subscriptions and attachment