docs(admin): add Docker/AIO systemd example for the AI worker - #1
Conversation
The "Systemd service" section only documented running the AI worker on bare metal. When Nextcloud runs inside a Docker container (for example Nextcloud AIO) the service has to wait for Docker and invoke occ inside the container via docker exec. Document extending the [Unit] section with a dependency on docker.service and a taskprocessing.sh that uses "docker exec -i" without -t, since systemd provides no pseudo-TTY. The command mirrors the existing AIO docker exec example in the screen/tmux section and uses the current taskprocessing:worker command. Signed-off-by: Cesar <275373127+sanzakicesarr@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a12832ec7b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| After=network.target docker.service | ||
| Requires=docker.service |
There was a problem hiding this comment.
Add container readiness before starting the Docker worker
On a host boot or Docker restart, After=/Requires=docker.service only waits for the Docker daemon; it does not wait for nextcloud-aio-nextcloud to exist or be running. In that window the added docker exec exits immediately, and the inherited unit above has Restart=always with StartLimitInterval=60/StartLimitBurst=10; systemd.service(5) documents RestartSec= as defaulting to 100ms and systemd.unit(5) says hitting StartLimitBurst stops further restarts, so the worker can enter start-limit-hit before AIO finishes starting. Please add a container-readiness wait or a sufficient RestartSec=/container-specific dependency so the documented service survives normal boots.
Useful? React with 👍 / 👎.
The Systemd service section of the AI overview only documented running the task-processing worker on bare metal. When Nextcloud runs inside a Docker container (for example Nextcloud AIO) the service has to (a) wait for Docker and (b) call
occinside the container viadocker exec. This adds that variant right after the existing systemd example:[Unit]section withAfter=network.target docker.serviceandRequires=docker.service, so the worker only starts once Docker is up;taskprocessing.shthat runsdocker exec -i nextcloud-aio-nextcloud sudo -E -u www-data php occ taskprocessing:worker -v -t 60.Using
docker exec -iwithout-tis deliberate: systemd provides no pseudo-TTY, so-twould fail withthe input device is not a TTY.Notes for review:
docker execexample already in the Screen or tmux session section (same container name, user and command) and uses the currenttaskprocessing:workercommand — the page documents (.. versionchanged:: 32.0.7) that this replacedbackground-job:worker... note::.ini/bashlanguage tags per the style guide ("always specify the language"); the surrounding pre-existing blocks are left untouched to keep the change focused.✅ Resolves
🖼️ Screenshots
A screenshot of the rendered Systemd service section will follow later today. The change is a prose + two code-block addition; the diff and the description above show exactly what is added.
✅ Checklist
codespellor similar and addressed any spelling issues