The simplest possible gopherd config: supervise a single long-running process and shut down if it fails.
# Minimal gopherd config: supervise a single long-running process.
processes:
- name: app
command: /usr/local/bin/myapp
args: ["300"]
on-failure: shutdowncommand— absolute path to the application binary.args— argument list passed directly; no shell involved.on-failure: shutdown— gopherd exits whenappexits non-zero.
- gopherd starts
appand supervises it. gopherd status appreportsrunning.- On SIGTERM, gopherd stops
appand exits 0. - Non-zero exit from
apptriggers gopherd shutdown.
Run level. The test substitutes /usr/bin/sleep for the placeholder /usr/local/bin/myapp, asserts status app shows running, then sends SIGTERM and asserts exit code 0.
Real configs point command at the actual application binary.
go test ./documentation/minimal/ -v