Skip to content

Land features and host-setup changes on main - #10

Merged
dafioram merged 3 commits into
mainfrom
claude/upbeat-cannon-w8n2qa-features
Oct 4, 2026
Merged

dafioram merged 3 commits into
mainfrom
claude/upbeat-cannon-w8n2qa-features

Conversation

@dafioram

@dafioram dafioram commented Oct 4, 2026

Copy link
Copy Markdown
Owner

#8 and #9 were stacked PRs. Each was merged into the branch below it instead of main, so their changes never reached main. This PR brings over exactly those two reviewed commits, unchanged:

Commit Originally
1aa59d3 Add exec, config, resource limits and CLI conveniences #8
8d32b46 host-setup: prefer a persistent journal over the systemd-journal group #9

There is no new code. The only other commit is the merge commit from #9.

Testing

  • On this branch against the current main: bats tests passes 76/76 and ShellCheck is clean.
  • The branch merges into main without conflicts.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KdsNJV9e2ktZ9gF5kmczEu


Generated by Claude Code

claude and others added 3 commits October 4, 2026 03:14
- The project folder is optional: `systemd-compose up` works in the
  current folder. `systemd-compose <folder> <command>` still works.
- -h/--help/help print a full usage summary and exit 0.
- logs: follows by default; extra options go straight to journalctl
  (`logs -n 200`, `logs --since today -f`).
- down keeps the venv; `down --volumes` (or -v) also deletes it.
  Unknown options are rejected before anything is removed.
- exec: run a one-off command like the service runs the app (venv
  first on PATH, .env variables, inside APP_DIR), e.g.
  `exec python manage.py migrate`. Returns the command's exit code.
- config: print the service file `run` would write and say whether the
  installed one is out of date. Changes nothing.
- MEMORY_MAX / CPU_QUOTA in config.env set MemoryMax=/CPUQuota=. Values
  are validated (systemd silently ignores invalid ones) and written
  without %-escaping, since these settings take "%" literally. `run`
  warns when the kernel can't enforce them; status shows the limit.
- Commands that take no options now reject extra arguments.
- 19 new tests (68 total), including systemd-analyze checks that the
  limits parse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KdsNJV9e2ktZ9gF5kmczEu
journald only writes a separate journal per user (readable by that user
without extra groups) when logs are stored on disk. The group workaround
let users read every log on the system.

- ensure_log_access: nothing to do if the user is already in
  systemd-journal or the journal is persistent (Storage=persistent, or
  auto with /var/log/journal). Otherwise offer to store the journal on
  disk via /etc/systemd/journald.conf.d/99-systemd-compose.conf, then
  restart journald and flush. Check the effective setting afterwards and
  report when another drop-in still forces volatile storage.
- Only if that's declined or fails, offer the systemd-journal group,
  with a note that it can read all system logs.
- The helpers are defined before any action runs, and the script stops
  after defining them when sourced, so the tests can check them.
- 8 tests with fake systemd-analyze/sudo/id/usermod.
- README: installation step and troubleshooting entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KdsNJV9e2ktZ9gF5kmczEu
…setup

host-setup: prefer a persistent journal over the systemd-journal group
@dafioram
dafioram merged commit ee9ea5d into main Oct 4, 2026
1 check passed
@dafioram
dafioram deleted the claude/upbeat-cannon-w8n2qa-features branch October 4, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants