Document Importarr issue deployment workflow

This commit is contained in:
2026-07-29 13:53:49 +02:00
parent 259f5e7ee2
commit 67335a37b9
+24 -2
View File
@@ -37,10 +37,32 @@ When asked to implement an Importarr feature, fix, UI change, deployment change,
``` ```
8. If the live install fails, inspect `systemctl status importarr.service` and `journalctl -u importarr.service`; fix the repo, commit/push the fix, reinstall, and verify again. 8. If the live install fails, inspect `systemctl status importarr.service` and `journalctl -u importarr.service`; fix the repo, commit/push the fix, reinstall, and verify again.
## Gitea Issue Completion Workflow
When the user points an agent at an Importarr Gitea issue and asks to solve it, the expected end-to-end flow is mandatory unless the user explicitly says not to deploy:
1. Read the issue first, including comments and acceptance criteria.
2. Implement the smallest correct repo change on a dedicated issue branch when appropriate.
3. Run the narrowest useful tests/checks.
4. Commit and push the completed change to `main` or merge/push the issue branch as instructed.
5. Update the Gitea issue with what changed and the verification that ran, then close it when solved.
6. Update the `dgsserver1` install from the pushed repo state:
```sh
ssh -p 2222 opencode@dgsserver1 'sudo -n sh /opt/importarr/repo-upgrade.sh'
```
7. Restart/verify the `dgsserver1` service from the repo-managed install and confirm the public URL:
```sh
ssh -p 2222 opencode@dgsserver1 'sudo -n systemctl status importarr.service --no-pager -l'
curl -fsS https://importarr.delphas.dk/health
```
If the worker timer is intentionally paused, do not re-enable it unless the issue explicitly includes worker scheduling or the user approves.
## Install Model ## Install Model
- The service virtualenv lives at `/opt/importarr/venv`. - The service virtualenv lives at `/opt/importarr/venv` on `dgsserver1`.
- The systemd unit runs `/opt/importarr/venv/bin/importarr` as the `importarr` system user. - The status UI systemd unit runs `/opt/importarr/venv/bin/importarr-status` from the packaged repo install.
- The manual worker systemd unit runs `/opt/importarr/venv/bin/manual-media-import` from the packaged repo install.
- The package is installed from the repository into the venv using normal wheel/package install, not editable install. - The package is installed from the repository into the venv using normal wheel/package install, not editable install.
- Do **not** use editable install for the system service: the unprivileged `importarr` user may not be able to read `/srv/opencode-workspace/importarr`, causing `ModuleNotFoundError` at startup. - Do **not** use editable install for the system service: the unprivileged `importarr` user may not be able to read `/srv/opencode-workspace/importarr`, causing `ModuleNotFoundError` at startup.
- `/opt/importarr/repo-upgrade.sh` is the pull-and-reinstall helper for machines that should follow pushed `main`. - `/opt/importarr/repo-upgrade.sh` is the pull-and-reinstall helper for machines that should follow pushed `main`.