Files
YANPM/apps/agent/doc/README.md

1.3 KiB

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.