docs(appctl): document source-built workload policy and build flag semantics
- Document --build, --no-cache, and automatic --pull behavior for appctl up and update - Add Source-Built Workload Policy note detailing compose_build action sequences - Mark item completed in todo.txt Closes #11 Refs #11
This commit is contained in:
1 parent
f631d5627c
commit
8ad48a49db
2 files changed
+17
-7
No files matched your search
+16
-6
@@ -101,11 +101,13 @@ appctl info docs --ssl
|
|||||||
|
|
||||||
### Lifecycle Management
|
### Lifecycle Management
|
||||||
|
|
||||||
#### `appctl up <service|core>`
|
#### `appctl up <service|core> [--build] [--no-cache]`
|
||||||
Starts the specified service stack in detached mode (`--remove-orphans`).
|
Starts the specified service stack in detached mode (`--remove-orphans`).
|
||||||
* For a workload in `~/Sites`: starts containers and triggers `appctl sync`.
|
* For a workload in `~/Sites`: starts containers and triggers `appctl sync`.
|
||||||
* For `core`: starts the entire Core Compose stack using `/run/secrets/homeserver.env`.
|
* For `core`: starts the entire Core Compose stack using `/run/secrets/homeserver.env`.
|
||||||
* For an individual Core service (e.g., `appctl up traefik`): starts that specific container.
|
* For an individual Core service (e.g., `appctl up traefik`): starts that specific container.
|
||||||
|
* When `--build` is passed: invokes `docker compose build --pull` prior to deployment. The `--pull` flag guarantees base images in Dockerfile `FROM` lines are refreshed from remote registries.
|
||||||
|
* When `--no-cache` is passed: `--build` is implied (`build: True`) and `docker compose build --pull --no-cache` is executed, forcing a clean rebuild without cached layers.
|
||||||
|
|
||||||
#### `appctl down <service|core>`
|
#### `appctl down <service|core>`
|
||||||
Stops and removes containers defined in the target's Compose file (or stops the targeted Core container).
|
Stops and removes containers defined in the target's Compose file (or stops the targeted Core container).
|
||||||
@@ -116,14 +118,22 @@ Restarts the target stack or individual container:
|
|||||||
* `appctl restart core`: Restarts all Core Compose services.
|
* `appctl restart core`: Restarts all Core Compose services.
|
||||||
* `appctl restart traefik`: Restarts only the Traefik container.
|
* `appctl restart traefik`: Restarts only the Traefik container.
|
||||||
|
|
||||||
#### `appctl update <service>`
|
#### `appctl update <service> [--branch <branch>] [--build] [--no-cache]`
|
||||||
Performs a sequential update workflow for a Sites workload stack:
|
Performs a sequential, revision-consistent update workflow for a Sites workload stack:
|
||||||
1. Verifies that the local Git working tree is clean (aborts if uncommitted changes exist).
|
1. Verifies that the local Git working tree is clean (aborts if uncommitted changes exist).
|
||||||
2. Runs `git pull --ff-only` to fast-forward the current branch.
|
2. Runs `git pull --ff-only [origin <expected_branch>]` to fast-forward the current branch.
|
||||||
3. Runs `docker compose pull` to fetch updated container images.
|
3. Re-validates `app.yaml`, expected branch declaration, and Compose security rules against the newly pulled working tree.
|
||||||
4. Runs `docker compose up -d --remove-orphans` to recreate containers.
|
4. Executes declared actions in `app.yaml` (`actions: [git_pull, compose_pull, compose_build, compose_up, compose_restart]`):
|
||||||
|
* `compose_pull`: Runs `docker compose pull` to fetch updated container images.
|
||||||
|
* `compose_build`: Runs `docker compose build --pull` (and `--no-cache` if requested).
|
||||||
|
* `compose_up`: Runs `docker compose up -d --remove-orphans` to recreate containers.
|
||||||
|
* When `--build` is passed via CLI, `compose_build` is automatically executed prior to `compose_up`, even if omitted from manifest actions.
|
||||||
|
* When `--no-cache` is passed, build is implied and executes with `--no-cache`.
|
||||||
5. Runs `appctl sync` to update the Homepage dashboard.
|
5. Runs `appctl sync` to update the Homepage dashboard.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> **Source-Built Workload Policy**: For workloads built directly from local source Dockerfiles rather than pre-built registry images, declare `compose_build` in `app.yaml` `deployment.actions` (`actions: [git_pull, compose_build, compose_up]`). Both manual `appctl update` and automated GitOps dispatcher runs will execute `docker compose build --pull` before recreating containers, ensuring reproducible builds with current upstream base layers.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Core platform updates are managed via version-controlled NixOS generations (`git pull` followed by `nixos-rebuild switch`), not through `appctl update core` (as Core is mounted read-only for `homelab-appctl.service`).
|
> Core platform updates are managed via version-controlled NixOS generations (`git pull` followed by `nixos-rebuild switch`), not through `appctl update core` (as Core is mounted read-only for `homelab-appctl.service`).
|
||||||
|
|
||||||
|
|||||||
@@ -42,5 +42,5 @@ x 2026-10-23 (A) Declare global Git safe.directory for /home/operator/Sites/* in
|
|||||||
x 2026-10-30 (B) Enforce fail-closed check on daemon socket availability and remove silent Bash fallback in scripts/appctl +cli @security
|
x 2026-10-30 (B) Enforce fail-closed check on daemon socket availability and remove silent Bash fallback in scripts/appctl +cli @security
|
||||||
x 2026-10-30 (B) Restore live container status inspection in workload.list and format STATUS column in scripts/appctl_cli.py +cli @ux
|
x 2026-10-30 (B) Restore live container status inspection in workload.list and format STATUS column in scripts/appctl_cli.py +cli @ux
|
||||||
(B) Bootstrap operator admin token provisioning helper and documentation in docs/appctl.md and docs/secrets-and-state.md +docs @auth
|
(B) Bootstrap operator admin token provisioning helper and documentation in docs/appctl.md and docs/secrets-and-state.md +docs @auth
|
||||||
(B) Wire --build/--no-cache and pass --pull during compose_build in scripts/appctl_router.py and scripts/appctl_cli.py +build @p4
|
x 2026-10-30 (B) Wire --build/--no-cache and pass --pull during compose_build in scripts/appctl_router.py and scripts/appctl_cli.py +build @p4
|
||||||
(C) Deprecate P6 on-server AI authoring compiler in favor of external Homelab MCP Gateway in ROADMAP.md and ADR 0002 +docs @roadmap
|
(C) Deprecate P6 on-server AI authoring compiler in favor of external Homelab MCP Gateway in ROADMAP.md and ADR 0002 +docs @roadmap
|
||||||
Reference in new issue
Block a user