Slim down server compose: entrypoint roles, self-migrating image

- docker-entrypoint.sh: `web` (default) or `worker`; both apply pending
  migrations under a flock on /data, so no start-order dependency
- docker-healthcheck.sh baked into the image for both roles
- deploy/compose.yaml reduced to image, role, env file, volumes, port
- dist/migrate.mjs bundled alongside the worker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pascal LinxweilerandClaude Opus 5.5 committed 2026-10-05 17:30:49 +02:00
1 parent 30b01d7bca
commit fbcdcf2e2d
8 files changed
+65 -72

No files matched your search

+6 -2
View File
@@ -35,16 +35,20 @@ Pushing a tag `vX.Y.Z` (must equal `version` in `package.json` and have a `## [X
Requirements: an `act_runner` registered for the repo/user with Docker access, and a repo secret
`REGISTRY_TOKEN` (personal access token with *package: read and write*).
On the server, use `deploy/compose.yaml` (pulls the released image instead of building):
On the server you only need `deploy/compose.yaml` and a filled-in `.env` (from `.env.example`) in
one folder; no source code, no Dockerfile:
```bash
# in a folder with deploy/compose.yaml and a filled-in .env next to it
docker compose pull && docker compose up -d
```
Pin a version with `KANAME_VERSION=0.4.0` in `.env`; the running version is shown next to the app
name in the header.
The image picks its role from the first argument: `web` (default) or `worker`. Both run pending
DB migrations at startup (serialized with a file lock on `/data`), and the image has a built-in
healthcheck for both roles.
## Local development
```bash