Make the image prepare its own data directory (closes #262) #266

Merged
clawbot merged 1 commits from issue-262-entrypoint-data-dir into next 2026-11-10 22:42:03 +01:00
Collaborator

Closes #262

A host directory mounted at /var/lib/neoirc kept the host's owner, so neoircd could not create state.db and stopped at startup.

  • New deploy/docker-entrypoint.sh runs as root. It creates /var/lib/neoirc, gives it and its contents to neoirc:neoirc, sets mode 0700, then runs exec su-exec neoirc neoircd "$@".
  • Runtime stage of Dockerfile: installs su-exec=0.2-r3, copies the entrypoint, drops USER neoirc, and uses the entrypoint as ENTRYPOINT. It no longer creates /var/lib/neoirc at build time, since the entrypoint does it on every start.
  • README.md "Docker" says the image prepares the directory itself and shows a host-directory mount beside the named volume.

Judgement call: the entrypoint assumes it starts as root. docker run --user makes it fail at chown, as the issue's script specifies.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/neoirc/issues/262 A host directory mounted at `/var/lib/neoirc` kept the host's owner, so `neoircd` could not create `state.db` and stopped at startup. - New `deploy/docker-entrypoint.sh` runs as root. It creates `/var/lib/neoirc`, gives it and its contents to `neoirc:neoirc`, sets mode `0700`, then runs `exec su-exec neoirc neoircd "$@"`. - Runtime stage of `Dockerfile`: installs `su-exec=0.2-r3`, copies the entrypoint, drops `USER neoirc`, and uses the entrypoint as `ENTRYPOINT`. It no longer creates `/var/lib/neoirc` at build time, since the entrypoint does it on every start. - `README.md` "Docker" says the image prepares the directory itself and shows a host-directory mount beside the named volume. Judgement call: the entrypoint assumes it starts as root. `docker run --user` makes it fail at `chown`, as the issue's script specifies. Model: opus-5-5
clawbot added the needs-review label 2026-11-10 21:29:16 +01:00
clawbot self-assigned this 2026-11-10 21:29:16 +01:00
Author
Collaborator

FAIL (needs-rework)

  1. deploy/docker-entrypoint.sh: the commands sit at the top level of the script. The shell section of https://git.eeqj.de/sneak/prompts/src/branch/main/prompts/CODE_STYLEGUIDE.md says to put all code in functions, with main called at the bottom, and every script/ entrypoint in this repo does so. Wrap the four commands in main() { … } and end the file with main "$@".
  2. README.md, "Layout": the list names each top-level directory but not the new deploy/. Add a bullet for it, for example: "deploy/: docker-entrypoint.sh, the image's entrypoint, which prepares /var/lib/neoirc and starts neoircd as neoirc."

Judgement call: the image failing under docker run --user is not a finding; the issue's script requires a root start.

Model: opus-5-5

FAIL (needs-rework) 1. `deploy/docker-entrypoint.sh`: the commands sit at the top level of the script. The shell section of https://git.eeqj.de/sneak/prompts/src/branch/main/prompts/CODE_STYLEGUIDE.md says to put all code in functions, with `main` called at the bottom, and every `script/` entrypoint in this repo does so. Wrap the four commands in `main() { … }` and end the file with `main "$@"`. 2. `README.md`, "Layout": the list names each top-level directory but not the new `deploy/`. Add a bullet for it, for example: "`deploy/`: `docker-entrypoint.sh`, the image's entrypoint, which prepares `/var/lib/neoirc` and starts `neoircd` as `neoirc`." Judgement call: the image failing under `docker run --user` is not a finding; the issue's script requires a root start. Model: opus-5-5
Author
Collaborator

For the reworker: fix findings 1 and 2 of #266 (comment) as each says; change nothing else.

Model: opus-5-5

For the reworker: fix findings 1 and 2 of https://git.eeqj.de/sneak/neoirc/pulls/266#issuecomment-175185 as each says; change nothing else. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-10 21:58:59 +01:00
clawbot added 1 commit 2026-11-10 22:07:14 +01:00
A host directory mounted at /var/lib/neoirc kept the host's owner, so
neoircd could not create state.db. The image now starts as root in
deploy/docker-entrypoint.sh, which creates /var/lib/neoirc, gives it to
neoirc with mode 0700, and runs neoircd as neoirc through su-exec.

Model: opus-5-5
clawbot force-pushed issue-262-entrypoint-data-dir from b3ecefe49d to a656cc3c9e 2026-11-10 22:07:14 +01:00 Compare
Author
Collaborator

Rework of #266 (comment), still one commit, now a656cc3:

  1. Fixed in deploy/docker-entrypoint.sh.
  2. Fixed: the deploy/ bullet follows script/, worded as suggested.

Model: opus-5-5

Rework of https://git.eeqj.de/sneak/neoirc/pulls/266#issuecomment-175185, still one commit, now `a656cc3`: 1. Fixed in `deploy/docker-entrypoint.sh`. 2. Fixed: the `deploy/` bullet follows `script/`, worded as suggested. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-11-10 22:25:01 +01:00
Author
Collaborator

PASS: the image prepares /var/lib/neoirc as root and runs neoircd as neoirc, as #262 asks.

Judgement call: su-exec is pinned to its package version, not a hash, as the issue specifies and sneak/webhooker does.

Model: opus-5-5

PASS: the image prepares `/var/lib/neoirc` as root and runs `neoircd` as `neoirc`, as https://git.eeqj.de/sneak/neoirc/issues/262 asks. Judgement call: `su-exec` is pinned to its package version, not a hash, as the issue specifies and `sneak/webhooker` does. Model: opus-5-5
clawbot merged commit f42c6214a0 into next 2026-11-10 22:42:03 +01:00
clawbot deleted branch issue-262-entrypoint-data-dir 2026-11-10 22:42:03 +01:00
Sign in to join this conversation.