feat: add comprehensive documentation for yanpm-agent, including API reference, configuration, deployment, usage examples, and troubleshooting
This commit is contained in:
19
apps/agent/doc/README.md
Normal file
19
apps/agent/doc/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# yanpm-agent Documentation
|
||||
|
||||
This directory contains in-depth documentation for the yanpm agent daemon (the binary built from `apps/agent`). The agent exposes a unix-socket HTTP API for writing nginx configuration fragments, validating them, and reloading nginx safely.
|
||||
|
||||
Docs included:
|
||||
|
||||
- `architecture.md` — Detailed explanation of the program flow and components.
|
||||
- `configuration.md` — CLI flags, environment variables, defaults, and permission handling.
|
||||
- `usage.md` — How to run the agent, curl examples, and systemd/docker hints.
|
||||
- `api.md` — HTTP API endpoints, request and response schemas, examples.
|
||||
- `deployment.md` — Deployment considerations, permissions, and systemd socket/unit examples.
|
||||
- `troubleshooting.md` — Common errors and solutions.
|
||||
|
||||
For implementation details, see the source in `apps/agent/src` (notably `main.rs`, `routes.rs`, and the `commands/` submodule).
|
||||
|
||||
Integration notes
|
||||
|
||||
- The agent is intended to run as a companion agent for the API service in `apps/api`. The API service calls the agent over the unix-domain socket to write nginx fragments, validate them, and trigger reloads.
|
||||
- A production Docker image is provided by `apps/agent/Dockerfile`. That Dockerfile packages nginx + the `yanpm-agent` binary and s6-overlay service scripts so a single container can run nginx and the agent alongside each other.
|
||||
Reference in New Issue
Block a user