Skip to content

Name the split worker services in documented compose commands - #593

Merged
haksungjang merged 2 commits into
mainfrom
docs/582-worker-service-names
Oct 25, 2026
Merged

haksungjang merged 2 commits into
mainfrom
docs/582-worker-service-names

Conversation

@haksungjang

@haksungjang haksungjang commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

The EN and KO guides had 106 docker-compose commands (53 per locale) and 20 code-formatted service mentions naming the worker service, which the production compose no longer has. Each now names the service that runs the task. Scan diagnostics, workspace and Trivy DB inspection, trivy commands and the stuck-scan restart go to worker-scan. The one-shot trustedoss.trivy_db_refresh call goes to worker-default. Logs for Trivy DB downloads and backups, which either default-queue consumer can run, name both. The dev getting-started command uses celery-worker, and the architecture table lists both workers and points to the engine profile.

Commands on the rewritten lines that would still fail are fixed too. Compose reads .env only when it creates a container, so every "edit .env, then restart" instruction now uses docker-compose up -d <services>. Other fixes: the Trivy verify step (--skip-update cannot be combined with --download-db-only; it now runs trivy version in the container), trivy image --download-db-only, the UpdatedAt metadata field, -A tasks.celery_app, the mirror credential path under /home/trustedoss, a mirror login on each worker, du globbing inside the container, and the KO runbook anchors. The cosign key helper is documented as a host script, because it is not in the image and /cosign is read-only; its hint in scripts/cosign-keygen.sh and .env.example changed with it.

tests/unit/test_docs_compose_service_names.py parses every docker-compose command in the guides' code, the README, .env.example and scripts/. It resolves the compose file from -f, fails on a -f file that is not in the repository, reads options per subcommand, and requires each named service (positional or in --scale/--exit-code-from) to exist. It replaces the narrower log-command check on the private-CA page. Reintroducing a stale name (KO inline code, an EN code block, --scale and run --rm in .env.example) or removing the KO private-CA log command each fails it for that reason, and it asserts command floors per locale.

Closes #582

The guides still ran docker-compose commands against the removed `worker`
service. Each now names worker-scan, worker-default (or both), or the dev
stack's celery-worker, by the queue that runs the task in question. A new
unit test checks every service a documented docker-compose command names
against the compose file it targets, replacing the private-CA page's check.
Apply .env changes with `docker-compose up -d`, since restart keeps the old
environment. Fix the Trivy verify and mirror commands, the cosign key helper
hint (it runs on the host), the workspace du glob and the KO runbook anchors.
The guard now reads per-subcommand options, --scale services, unknown -f
files, .env.example and scripts/, and checks each locale separately.
@haksungjang
haksungjang merged commit 825daf9 into main Oct 25, 2026
34 checks passed
@haksungjang
haksungjang deleted the docs/582-worker-service-names branch October 25, 2026 00:39
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.

Docs still refer to the removed worker compose service

1 participant