StackController
Serves the compose file of every service the booted plugins declared — readable by a human and by the agent. The same discovery the Stack section reads ({@see StackReader::declarations()}), projected whole by {@see ComposeProjection}. Secrets come out as `${NAME}`; the operator supplies them. Nothing is cached: the file is the declarations as they are on this request. When two plugins declare the same service name there is no file to serve — compose keys services by name and one would silently overwrite the other — so the answer is a 409 that names the collision instead ({@see StackReader::conflicts()}).
StackController::__construct()
public function __construct(Milpa\Runtime\Stack\StackReader $source, Milpa\Runtime\Stack\ComposeProjection $projection, Milpa\Admin\I18n\Catalog $catalog):Parameters
| Name | Type | Description |
|---|---|---|
| $source | Milpa\Runtime\Stack\StackReader | |
| $projection | Milpa\Runtime\Stack\ComposeProjection | |
| $catalog | Milpa\Admin\I18n\Catalog |
StackController::compose()
public function compose(Psr\Http\Message\ServerRequestInterface $request): Psr\Http\Message\ResponseInterface`GET {route}/stack/compose.yml` — the whole stack as a compose file, `text/yaml`, served as a download; `409 text/plain` with one line per colliding service name when there is no honest file.
Parameters
| Name | Type | Description |
|---|---|---|
| $request | Psr\Http\Message\ServerRequestInterface |