feat(compose): add logosdeliverynode docker-compose stack - #4057
Open
NagyZoltanPeter wants to merge 3 commits into
Open
feat(compose): add logosdeliverynode docker-compose stack#4057NagyZoltanPeter wants to merge 3 commits into
NagyZoltanPeter wants to merge 3 commits into
Conversation
Add apps/logos_delivery_node/compose/, a docker-compose project that runs the logosdeliverynode image (built from the repo Dockerfile) as a service node with a Postgres store and a Prometheus + Grafana monitoring stack. Ported from logos-messaging/logos-delivery-compose and adapted for logosdeliverynode: - Network selection via --preset (default logos.dev) and --entry-layer (default kernel), both configurable through PRESET / ENTRY_LAYER env vars. - Postgres-backed store; node startup gated on the postgres healthcheck to avoid a crash-loop on connection-refused. - WebSocket-Secure via certbot, enabled only when DOMAIN is explicitly set (no reverse-DNS auto-guess, which could deadlock the node waiting for a cert). - --mix=true passed explicitly (the preset alone sets the flag but does not mount the mix protocol). - Grafana branded with the Logos mark; dashboard file named logos-delivery-monitoring.json. - RLN, setup_wizard and RLN keystore tooling intentionally omitted for now. Also exclude /nimbledeps and /build from the Docker build context: a populated host nimbledeps/ leaks into the context and has its package submodules stripped by the **/vendor/* rule, breaking the in-container `make build-deps`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
NagyZoltanPeter
requested review from
AlbertoSoutullo,
Ivansete-status,
darshankabariya,
fcecin,
igor-sirotin,
stubbsta and
vpavlin
and removed request for
vpavlin
July 22, 2026 11:01
Two fixes for the docker-build-ubuntu-22.04 job: - .dockerignore: drop /build. docker/binaries/Dockerfile.bn.amd64 ADDs the freshly compiled binaries from ./build/, so ignoring it makes the docker build fail deterministically with '"/build/wakunode2": not found'. /nimbledeps stays ignored (that was the actual context-bloat culprit). - container-image.yml: build wakunode2 and logosdeliverynode in sequential make invocations. Under a single `make -j` the two `nimble <task>` invocations re-resolve git deps concurrently and clobber each other in the shared ~/.nimble/pkgcache. Same fix as ci.yml's -j1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
You can find the images built from this PR at Built from d75f250 |
fcecin
approved these changes
Jul 23, 2026
fcecin
left a comment
Contributor
There was a problem hiding this comment.
Great!
Got Fable 5 to review so maybe this helps:
# Review: PR #4057 — feat(compose): add logosdeliverynode docker-compose stack
**Verdict: LGTM after two small fixes.** The port from logos-delivery-compose is faithful
(most files are byte-identical to the reference), the adaptation in run_node.sh /
docker-compose.yml matches the PR description exactly, and the stack was clearly
live-verified. Two things should be fixed before merge, both quick.
## Must fix
### 1. Dead dashboard panels after the Prometheus job rename
The dashboard JSON is a verbatim copy of the reference `nwaku-monitoring.json`, but this PR
renames the Prometheus scrape job from `nwaku` to `logos-messaging-node` (and thus the
instance label from `nwaku:8003` to `logos-messaging-node:8003`). Two panels still pin the
old names and will show "No data":
- panel **"Start Times (UTC)"**: `process_start_time_seconds{job="nwaku"}`
- panel **"Version"**: `waku_version{instance="nwaku:8003"}`
Fix: search-replace `nwaku` -> `logos-messaging-node` inside
`monitoring/configuration/dashboards/logos-delivery-monitoring.json` (4 occurrences total).
Everything else in the dashboard is either unfiltered or keyed on the `$Instance` template
variable (which is derived from the postgres-exporter job and unaffected).
### 2. Missing `target:` in the compose build
The `build:` block for `logos-messaging-node` has no `target:`, so `docker compose build`
builds the **last** stage of the root Dockerfile — `debug-with-heaptrack`. That means:
- heaptrack is cloned from KDE and compiled with cmake for nothing (extra build time), and
- the network-facing node image ships gdb + heaptrack.
It happens to work only because the compose service overrides `entrypoint: sh` (the stage's
own entrypoint is heaptrack). Add `target: prod` now — or `target: logosdeliverynode` once
PR #4059 (which adds that stage) merges.
## Notes (non-blocking)
- **`.env.example` DOMAIN comment is stale**: it says "Leave empty to auto-detect from
reverse DNS", but this PR deliberately removed the reverse-DNS auto-guess (run_node.sh
documents why — the cert-wait deadlock). The README already has the correct wording
("empty disables WSS"); align .env.example with it.
- **PR body is stale on `.dockerignore`**: it says "/nimbledeps and /build" are excluded,
but the follow-up commit correctly kept `/build` in the context (docker/binaries/
Dockerfile.bn.amd64 ADDs the prebuilt binaries from ./build/). Final state excludes only
/nimbledeps — worth updating the description.
- The `container-image.yml` serialize commit is byte-identical to the one in PR #4058 —
merges cleanly in either order, whichever lands second just contributes an empty change.
- Inherited verbatim from the reference repo (fine to leave, listing for awareness):
- run_certbot.sh defines `EMAIL` but the certbot call hardcodes `--email admin@DOMAIN`;
- chkhealth.sh passes a stray `GET` argument to curl (works by accident — curl treats it
as a failing extra URL and the exit status of the last transfer wins);
- set_storage_retention.sh's sudo check (`[ "$(... | grep -c ...)" ]`) is always true, so
it uses sudo whenever ./postgresql exists;
- Grafana runs with anonymous **Admin** on 0.0.0.0:3000 (the README does say so);
- the certbot service always binds host port 80, even with DOMAIN unset.
Ivansete-status
approved these changes
Jul 26, 2026
Ivansete-status
left a comment
Collaborator
There was a problem hiding this comment.
LGTM!
I haven't looked at the changes in detail but I like the idea. We might need to deprecata/archive the former docker-compose repo: https://github.com/logos-messaging/logos-delivery-compose.
| ## Quick start | ||
|
|
||
| ```bash | ||
| cd apps/logos_delivery_node/compose |
Collaborator
There was a problem hiding this comment.
I think is more explicit to use the term docker for that folder's name.
Suggested change
| cd apps/logos_delivery_node/compose | |
| cd apps/logos_delivery_node/docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
apps/logos_delivery_node/compose/— adocker-composeproject that runs the logosdeliverynode image as a service node with a Postgres store and a Prometheus + Grafana monitoring stack. Ported fromlogos-messaging/logos-delivery-composeand adapted forlogosdeliverynodeinstead ofwakunode2.Services
logos-messaging-nodeDockerfile,MAKE_TARGET=logosdeliverynode,-d:postgres; overridable viaLOGOS_IMAGE)postgres+postgres-exporterprometheus+grafanacertbotConfiguration
PRESET(defaultlogos.dev) andENTRY_LAYER(defaultkernel) are env-configurable via.env; emptyPRESETdisables the preset.--entry-layeris always emitted (the binary's own default ischannels, notkernel).STORAGE_SIZE).Notable decisions / fixes
.dockerignore: exclude/nimbledepsand/build. A populated hostnimbledeps/leaked into the build context and had its package submodules stripped by**/vendor/*, breaking the in-containermake build-deps. Excluding it lets the container resolve deps fresh (context dropped ~4.6 GB → ~370 kB) and also speeds up the existingwakunode2docker builds.depends_onis gated onpostgres: condition: service_healthyto avoid a startup crash-loop on connection-refused.DOMAINis explicitly set (dropped the reference's reverse-DNS auto-guess, which could deadlock the node waiting for a cert that certbot never issues).--mix=trueis passed explicitly — thelogos.dev/logos.testpresets set the mix flag but do not mount the mix protocol on their own (also affectswakunode2 --preset=logos.dev; worth a separate issue).logos-delivery-monitoring.json.setup_wizard, RLN keystore tooling.Verification
docker compose buildproduces a working image; binary boots and joins the network.logos.dev/kernelandlogos.test/messaging:nodeHealth: READY, connects to bootstrap peers, discv5 up, Postgres store migrates.messagestable accumulates live traffic./admin/v1/peers+libp2p_peersreconcile; Grafana scrape targetsup.POST /messaging/v1/messages→requestId;GET /messaging/v1/events/send/{id}showspropagated+sent;GET /messaging/v1/events/receivedreturns the message — all correlated withsend_service.nimlog lines by matchingrequestId/msgHash.🤖 Generated with Claude Code