Repository navigation
build: run the services on the official Node binary instead of pkg - #89
Draft
juliusknorr wants to merge 1 commit into
Draft
juliusknorr wants to merge 1 commit into
juliusknorr wants to merge 1 commit into
Conversation
Ship the sources with their production node_modules and a pinned Node binary. The service paths (DocService/docservice, ...) become small wrappers, so supervisor, systemd and the orchestrated entrypoint keep working unchanged. Idle memory per process drops from ~185-311 MB to ~38-119 MB. Signed-off-by: Julius Knorr <jus@bitgrid.net> Assisted-by: ClaudeCode:claude-opus-5-5
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.
Drops pkg. The services now run on the official Node binary (pinned
node:26.13.1-bookworm-slim, also used for the build) with their sources and productionnode_modulesas plain files.DocService/docservice,FileConverter/converter,Metrics/metrics,AdminPanel/server/adminpanelare now smallshwrappers at the old paths, so supervisor, systemd and the orchestrated entrypoint stay unchanged.docker/install-runtime.shwrites the installed layout to${BUILD_ROOT}/server(Dockerfile, e2e and the dev Makefile share it)license/NodeJS.licenseand is listed in3rd-Party.txtWhy: every pkg process idles at ~195 MB before running any app code (stock Node: 44 MB), Node fixes need a pkg rebuild (DocumentServer#467), and pkg's file detection keeps missing modules (DocumentServer#267, DocumentServer#535).
Measured on nightly with this tree overlaid (arm64, 4 CPUs, idle PSS):
Server directory on disk: 765 MB → 581 MB. Editors open, an xlsx→pdf conversion through
/converterworks, metrics and adminpanel start.Merge order: must land together with DocumentServer#605 (bundle copies
${BUILD_ROOT}/server) and document-server-package#30 (rpm%attronserver/node).Not verified locally: deb/rpm builds (
dh_stripon foreign-arch prebuilt.nodefiles innode_modules) and the orchestrated image, both need CI.AI-assisted change, reviewed and tested by me.