Supervise two independent long-running services in one container. Each runs concurrently and is restarted or shuts the container down per its own policy.
# Supervise two independent long-running services.
processes:
- name: web
command: /usr/local/bin/web
args: ["300"]
on-failure: shutdown
- name: worker
command: /usr/local/bin/worker
args: ["300"]
on-failure: shutdownwebandworkerhave noafter/requires, so they start in parallel.on-failure: shutdown— if either exits non-zero, gopherd shuts everything down.
- Both services start and run concurrently.
gopherd statuslists bothwebandworker.- On SIGTERM, gopherd stops both and exits 0.
Both placeholder binaries are replaced with /usr/bin/sleep. The test asserts both names appear in status, that each reports running, then sends SIGTERM and asserts exit code 0.
go test ./documentation/multi-service/ -v