GRI-1886: serve the built panel from the server binary and the image #116

Merged
vivy merged 4 commits from feature/GRI-1886-serve-panel-from-server into dev 2026-11-10 20:50:56 +00:00
Member

Closes grimoire-of-digital-signage#114.

Summary

  • crates/server now serves the built frontend-web panel at /, with an
    SPA fallback to index.html for any path not handled by router().
    GET /health and GET /api/v1/... are unaffected.
  • [panel] directory config (SIGNAGE_PANEL_DIRECTORY), default
    /usr/local/share/grimoire-signage/panel — build output, not kept under
    the admin's persistent volume.
  • packaging/server/Dockerfile adds a Node build stage for frontend-web
    (Node version from .nvmrc, same pattern as RUST_VERSION) and bakes
    dist/ into the image. scripts/package-server-image.sh and
    docker-compose.yml pass NODE_VERSION through.
  • plan/operations/deployment.md documents both the Docker and systemd
    install paths for the panel.

Test plan

  • scripts/local-gates.sh passes (Rust + frontend, including the
    gated Postgres integration suite)
  • New unit tests in crates/server/src/http.rs for router_with_panel:
    root serves the index, an SPA route falls back to the index, /health
    still answers JSON
  • New integration test crates/server/tests/panel_integration.rs:
    GET / is text/html, GET /api/v1/setup/status is still JSON
Closes grimoire-of-digital-signage#114. ## Summary - `crates/server` now serves the built `frontend-web` panel at `/`, with an SPA fallback to `index.html` for any path not handled by `router()`. `GET /health` and `GET /api/v1/...` are unaffected. - `[panel] directory` config (`SIGNAGE_PANEL_DIRECTORY`), default `/usr/local/share/grimoire-signage/panel` — build output, not kept under the admin's persistent volume. - `packaging/server/Dockerfile` adds a Node build stage for `frontend-web` (Node version from `.nvmrc`, same pattern as `RUST_VERSION`) and bakes `dist/` into the image. `scripts/package-server-image.sh` and `docker-compose.yml` pass `NODE_VERSION` through. - `plan/operations/deployment.md` documents both the Docker and systemd install paths for the panel. ## Test plan - [x] `scripts/local-gates.sh` passes (Rust + frontend, including the gated Postgres integration suite) - [x] New unit tests in `crates/server/src/http.rs` for `router_with_panel`: root serves the index, an SPA route falls back to the index, `/health` still answers JSON - [x] New integration test `crates/server/tests/panel_integration.rs`: `GET /` is `text/html`, `GET /api/v1/setup/status` is still JSON
GRI-1886: serve the built panel from the server binary and the image
Some checks failed
CI / cargo fmt (pull_request) Successful in 9s
CI / the pre-push hook (pull_request) Successful in 11s
CI / cargo deny (pull_request) Successful in 1m42s
CI / cargo deny advisories (pull_request) Failing after 1m48s
CI / repository boundary (pull_request) Successful in 14s
CI / CI (pull_request) Has been cancelled
CI / Notify gate failed (pull_request) Has been cancelled
CI / frontend-web (pull_request) Has been cancelled
CI / cargo clippy (pull_request) Successful in 10m40s
CI / cargo test (pull_request) Successful in 11m57s
b04640cbef
crates/server now serves frontend-web's build at /, with an SPA fallback
to index.html for any path router() does not otherwise match. The panel
directory is configurable (SIGNAGE_PANEL_DIRECTORY, default
/usr/local/share/grimoire-signage/panel) and kept out of the admin's
persistent volume since it is build output, not state.

packaging/server/Dockerfile gains a node build stage for frontend-web and
bakes dist/ into the image; scripts/package-server-image.sh reads
NODE_VERSION from .nvmrc the same way it already reads RUST_VERSION from
rust-toolchain.toml. deployment.md documents both the Docker and systemd
paths.
GRI-1886: make the Compose database a config choice, not a file edit
Some checks failed
CI / the pre-push hook (pull_request) Successful in 5s
CI / cargo fmt (pull_request) Successful in 5s
CI / cargo deny (pull_request) Failing after 2m46s
CI / cargo deny advisories (pull_request) Failing after 2m46s
CI / repository boundary (pull_request) Successful in 7s
CI / cargo clippy (pull_request) Successful in 10m41s
CI / cargo test (pull_request) Successful in 11m57s
CI / frontend-web (pull_request) Successful in 10m15s
CI / CI (pull_request) Failing after 3s
CI / Notify gate failed (pull_request) Successful in 3s
8d4ff87039
db sits behind the bundled-db profile, on by default via .env.example;
server's depends_on is required: false so it runs without it.
SIGNAGE_DATABASE_URL defaults to the bundled form when unset, letting
an external url override it without touching docker-compose.yml.
GRI-1886: retrigger CI (cargo deny passes locally; investigating CI-only failure)
Some checks failed
CI / the pre-push hook (pull_request) Successful in 11s
CI / cargo fmt (pull_request) Successful in 11s
CI / cargo deny advisories (pull_request) Failing after 2m29s
CI / cargo deny (pull_request) Failing after 2m34s
CI / repository boundary (pull_request) Successful in 6s
CI / cargo clippy (pull_request) Successful in 11m1s
CI / cargo test (pull_request) Successful in 12m4s
CI / frontend-web (pull_request) Successful in 11m7s
CI / Notify gate failed (pull_request) Successful in 4s
CI / CI (pull_request) Failing after 4s
c1c8fb9d17
Pandora removed this from the MVP - Campus deploy milestone 2026-11-10 18:29:59 +00:00
Merge branch 'dev' into feature/GRI-1886-serve-panel-from-server
Some checks failed
CI / the pre-push hook (pull_request) Successful in 5s
CI / cargo fmt (pull_request) Successful in 5s
CI / cargo deny (pull_request) Successful in 29s
CI / cargo clippy (pull_request) Successful in 11m8s
CI / cargo deny advisories (pull_request) Failing after 1m51s
CI / repository boundary (pull_request) Successful in 7s
CI / frontend-web (pull_request) Successful in 10m28s
CI / cargo test (pull_request) Successful in 11m42s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 3s
3fd26f127f
vivy merged commit 4734441106 into dev 2026-11-10 20:50:56 +00:00
vivy deleted branch feature/GRI-1886-serve-panel-from-server 2026-11-10 20:50:56 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!116
No description provided.