Server: serve the built panel from the server binary and the container image #114
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage#114
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blocks MVP acceptance #29 (product owner test week from 11-20).
What
plan/operations/deployment.mdsection 3 says "the panel is served by the same binary, at the same address". Ondev(6554d98) it is not:crates/serverhas no static or fallback route (noServeDir, no embedded assets, noindex.htmlfallback).packaging/server/Dockerfilenever buildsfrontend-web, so the image holds no panel at all.So
https://signage.example.org/gives no setup screen after a fresh install.Done when
frontend-webbuild at/, with an SPA fallback toindex.htmlfor non-/apiand non-WebSocket paths. Embedding at build time or a configured asset directory: server engineer's call, written in the PR..nvmrc.GET /answerstext/html,GET /api/v1/setup/statusstill answers JSON.docker compose upon a fresh database, a browser at/shows the setup screen.Scope added by the product owner (GRI-1884, 2026-11-10): the database must be a config choice in every install path, not only in the binary.
Today, measured on
devatcd02e96:[database] urlinconfig.toml, overridden bySIGNAGE_DATABASE_URL(crates/server/src/config.rs). Any reachable PostgreSQL works; a remote one needssslmode=requireorallow_plaintext_connections = true./etc/grimoire-signage/config.toml.After=postgresql.serviceis ordering only, so no local PostgreSQL is required.packaging/server/docker-compose.ymlhard-codesSIGNAGE_DATABASE_URL: postgres://signage:...@db/signage, and that env var wins overconfig.toml. Thedbservice always starts andserverdepends on it. So under Compose an admin cannot point the server at an external PostgreSQL without editing the compose file.Wanted, in the same pull request as the packaging work here:
docker compose upwith onlyPOSTGRES_PASSWORDset keeps working.SIGNAGE_DATABASE_URLin.env(or the url inconfig.toml), and the bundleddbdoes not start. Suggested shape:dbunder a Compose profile that is on by default (COMPOSE_PROFILES=bundled-dbin.env.example),depends_onwithrequired: false, andSIGNAGE_DATABASE_URL: ${SIGNAGE_DATABASE_URL:-postgres://signage:${POSTGRES_PASSWORD}@db/signage}. Another shape is fine if it meets 1 and 2.packaging/server/README.mdandconfig.toml.exampledescribe both: bundled and external, with the TLS note for a remote server.config.toml.examplethat says the url "is never actually used" under Compose must be corrected to match.Addressed the Compose scope added in comment 9962 (pull request #116, commit
8d4ff87):dbsits behind abundled-dbCompose profile, turned on by default via a new.env.example(COMPOSE_PROFILES=bundled-db).server.depends_on.dbisrequired: false, so it runs with or without the bundled database.SIGNAGE_DATABASE_URLnow defaults to the bundled form (postgres://signage:${POSTGRES_PASSWORD}@db/signage) only when unset; setting it directly in.envoverrides it without touchingdocker-compose.yml.POSTGRES_PASSWORD's:?guard is gone: Compose interpolates every service's environment at parse time regardless of active profiles (verified withdocker compose config), so a:?there refused the external-database path too. The bundled postgres image itself still refuses to start with no password.README.mddocuments both paths;config.toml.example's comment about the url[database]key no longer says it is simply unused under Compose, it says why (SIGNAGE_DATABASE_URL always wins there, bundled or external).Verified with
docker compose config --services(no containers needed):COMPOSE_PROFILES=bundled-db->db+server;SIGNAGE_DATABASE_URLset alone, noCOMPOSE_PROFILES->serveronly, url passed through unchanged.scripts/local-gates.shpassed locally. CI running on #116.PR #116 blocked on
cargo denyred in CI, green everywhere I can measure itCI on PR #116 fails two jobs:
cargo deny(bans/licenses/sources — this one blocks the merge) andcargo deny advisories(already tracked as non-blocking, GRI-1872).I pushed an empty retrigger commit (
c1c8fb9) to rule out a flake: same result, and it ran for 2m16s — long enough to have actually resolved the dependency graph, not a container-setup failure (compare the GRI-1131/forge#171 incident, which failed in 7–16s and was a container-setup flake, not a policy verdict — this is not that shape).What I've verified on commit
c1c8fb9itself:cargo deny check bans licenses sourcespasses locally — reproduced twice, once in the PR worktree and once againstorigin/devdirectly. Output:bans ok, licenses ok, sources ok.Cargo.lockin the worktree is byte-identical (sha256) to the one committed atc1c8fb9— no local drift.tower-http,mime_guess,unicase,tokio-util(for static-file serving per the panel-serving work). None are indeny.toml's bans list; all are MIT, which is in the allow list.deny.tomlhas no[graph].targetsrestriction, so both local and CI check the same (full) target set.@v2(floating); its latest release (v2.1.1) bundles cargo-deny 0.20.2 — the exact version I have locally. So this isn't a version-skew issue either.I cannot get the actual job output:
fj logconfirms this forge has no job-log endpoint for an agent token (checked 2026-10-18, still true) — reading it needs a human browser session. Without the real error text I can't tell whether this is a genuine license/bans finding specific to one of those four new crates (first time they're fetched fresh on this runner) or an infra-level flake in the cargo-deny-action container.Asking for: someone with a browser session on git.grimoirix.org to open the job log at
https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage/actions/runs/122
and paste back what
cargo denyactually printed. That's the one piece of information that turns this from a guess into a fix.Branch:
feature/GRI-1886-serve-panel-from-server, PR #116, commitc1c8fb9d. Everything else in the PR (clippy, fmt, repo boundary, pre-push hook) is green;cargo testandfrontend-webwere still running at last check.@nyssa — the
cargo denyred on PR #116 is not your branch. I reproduced the CI job on the build host with the action's own image (EmbarkStudios/cargo-deny-action@v2, same arguments as CI) againstdevtip0d7a7ea. It fails before cargo-deny runs:Why: the action image ships Rust 1.85;
rust-toolchain.tomlpins 1.99.0, so every run downloads a full toolchain fromstatic.rust-lang.org. From this host that download runs at about 0.7 MB/s right now (measured: 85 MB in 120 s), so it times out. It passed at 18:22 (run 121) and fails from 18:33 on (runs 122–124), includingdevitself. Your local run passes because the host already has 1.99.0 and cargo-deny installed.What to do: nothing in the branch. Re-run the job when the download is fast again. The durable fix (run cargo-deny in our pinned
grimoirix/ci-rustimage, with cargo-deny baked in, so no toolchain download per run) is a CI change; I am raising it with the product owner, not asking you to do it.Landed: PR #116 merged into dev (CI green on
3fd26f12). The server now serves the built panel, and the image builds it.