Revert "fix(maestro): maestro-web is now a proxy, not a local registry (NAP-231)"
This reverts commit 3b6dd50c1d.
This commit is contained in:
+13
-23
@@ -45,10 +45,9 @@ The wizard:
|
||||
enable + start it.
|
||||
4. On systemd hosts, also offers a **local web UI** unit
|
||||
(`~/.config/systemd/user/maestro-web.service`). When accepted, this also
|
||||
`cargo install`s `maestro-web` — a thin front-end that serves the bundled
|
||||
UI on `127.0.0.1:8888` (override with `--web-bind`) and reverse-proxies
|
||||
`/api` to your existing registry. Skip with `--no-web` (or answer "n"); you
|
||||
can always just open the registry's own URL in a browser instead.
|
||||
`cargo install`s `maestro-registry` and runs it bound to `127.0.0.1:8888`
|
||||
(override with `--web-bind`). Skip with `--no-web` (or just answer "n"); a
|
||||
remote registry deployment is the alternative.
|
||||
|
||||
Binaries land in `~/.cargo/bin` — make sure that's on your `$PATH`.
|
||||
|
||||
@@ -63,10 +62,9 @@ Binaries land in `~/.cargo/bin` — make sure that's on your `$PATH`.
|
||||
| `--exec-start <path>` | Override the systemd unit's `ExecStart` (default `~/.cargo/bin/maestrod`). |
|
||||
| `--no-systemd` | Skip the systemd step even if detected. |
|
||||
| `--no-configure` | Skip the `maestrod configure` step. |
|
||||
| `--no-web` | Skip the optional local web-UI unit + `maestro-web` install. |
|
||||
| `--no-web` | Skip the optional local web-UI unit + `maestro-registry` install. |
|
||||
| `--web-bind <addr>` | Loopback bind for the web UI (default `127.0.0.1:8888`). |
|
||||
| `--web-registry <url>` | Upstream registry the proxy forwards `/api` to (default: read from `~/.config/maestrod/config.toml`). |
|
||||
| `--web-exec-start <path>` | Override the web unit's `ExecStart` (default `~/.cargo/bin/maestro-web`). |
|
||||
| `--web-exec-start <path>` | Override the web unit's `ExecStart` (default `~/.cargo/bin/maestro-registry`). |
|
||||
| `-y`, `--yes` | Non-interactive: install binaries + drop systemd unit + reload + enable, but **don't** auto-run `configure` or auto-start the unit (those need real config). |
|
||||
|
||||
## What the systemd unit looks like
|
||||
@@ -97,23 +95,19 @@ systemctl --user status maestrod
|
||||
journalctl --user -u maestrod -f
|
||||
```
|
||||
|
||||
The optional `maestro-web.service` runs a thin front-end that serves the
|
||||
embedded web bundle and reverse-proxies `/api` (HTTP + WS) to a configured
|
||||
upstream registry — so you can hit the UI on `localhost` while the daemon
|
||||
keeps talking to whichever registry it was registered with:
|
||||
The optional `maestro-web.service` looks like:
|
||||
|
||||
```ini
|
||||
[Unit]
|
||||
Description=Maestro local web UI (maestro-web on 127.0.0.1:8888, proxying https://maestro-registry.example.com)
|
||||
Description=Maestro local web UI (maestro-registry on 127.0.0.1:8888)
|
||||
Documentation=https://git.naps.pt/naps62/maestro
|
||||
After=network-online.target maestrod.service
|
||||
Wants=maestrod.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=MAESTRO_WEB_BIND_ADDR=127.0.0.1:8888
|
||||
Environment=MAESTRO_REGISTRY=https://maestro-registry.example.com
|
||||
ExecStart=%h/.cargo/bin/maestro-web
|
||||
Environment=MAESTRO_REGISTRY_BIND_ADDR=127.0.0.1:8888
|
||||
ExecStart=%h/.cargo/bin/maestro-registry
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
@@ -121,14 +115,10 @@ RestartSec=5
|
||||
WantedBy=default.target
|
||||
```
|
||||
|
||||
`Wants=maestrod.service` (not `Requires=`) — `maestro-web` is just a proxy
|
||||
to the upstream registry; locally it doesn't depend on `maestrod` to start.
|
||||
But the UI has nothing to show without a daemon connected, so we order
|
||||
this after `maestrod` and politely encourage it.
|
||||
|
||||
The wizard fills in `MAESTRO_REGISTRY` from the daemon's
|
||||
`~/.config/maestrod/config.toml` automatically; override with
|
||||
`--web-registry <URL>`.
|
||||
`Wants=maestrod.service` (not `Requires=`) — the registry process is
|
||||
technically independent of the daemon, but the web UI has nothing to show
|
||||
without one connected, so we order this after `maestrod` and politely
|
||||
encourage it.
|
||||
|
||||
## Running the wizard without the bootstrap script
|
||||
|
||||
|
||||
Reference in New Issue
Block a user