Repository navigation
docs: DEPLOY.md for vision.hyphy.org; CI on Node 18/22/24 (#899) - #901
Merged
Merged
Conversation
#896) file-loader/url-loader name emitted files with loader-utils getHashDigest, which calls crypto.createHash('md4'). OpenSSL 3 rejects MD4 unless node runs with --openssl-legacy-provider, and node builds on OpenSSL 1.1 refuse that flag in NODE_OPTIONS, so the unconditional flag in the build scripts broke one group or the other. - Handle fonts and images with webpack 5 asset modules (asset for woff/woff2 with the same 10000 byte inline limit, asset/resource for the rest) in webpack.config.js and webpack.config.library.js. - Set output.hashFunction to xxhash64 so no MD4 is used anywhere. - Remove NODE_OPTIONS=--openssl-legacy-provider from build and build:library. - Add engines.node >=16.20.2 and .nvmrc (22). This also fixes a latent bug: woff/woff2 matched both the url-loader and file-loader rules, so the CSS pointed at data: URIs holding file-loader's JS output instead of the font files; browsers fell back to ttf/eot. The woff/woff2 references now resolve to the emitted files.
Content-hashed asset and chunk names changed with the move off MD4, so set output.clean in the app webpack config to stop stale files piling up in dist/. Add 22.x to the CI matrix to match .nvmrc.
Document hosts and roles, Node versions for build vs serve, the build command (with the OpenSSL 3 note pending #896), build-in-staging-then-swap with a non-empty dist guard, pm2 restart, smoke checks, backup/rollback and a release checklist. Unconfirmed details are marked TODO. Replace the stale README deployment section with a link to DEPLOY.md. CI: test the serve Node (17.x), production build Node (23.x) and current LTS (24.x) alongside 18.x, with fail-fast off, and smoke-test server.js after the build.
jest@29 declares engines that exclude Node 17, so `yarn install` fails on a 17.x matrix leg. Drop 17.x from the build/test matrix and add a serve-node job that builds on 23.x and then runs the server.js smoke test under Node 17.9.1, the Node pm2 uses in production. DEPLOY.md: run the staging smoke server under the serve Node with `nvm exec 17.9.1`, and refresh the live checkout's production dependencies after the reset in the swap step so server.js does not run against stale node_modules.
The build no longer needs --openssl-legacy-provider (#896) and webpack now cleans dist/ (#898), so DEPLOY.md drops those workarounds. Production moves to Node 22 (.nvmrc) for both building and serving, which removes the Node 17 serve-only CI job and the --ignore-engines install. CI runs 18.x, 22.x and 24.x on actions v4, and no longer triggers on the deleted develop branch.
stevenweaver
changed the base branch from
issue-896-build-node-openssl
to
master
October 6, 2026 21:32
…DEPLOY.md (#899) The hyphy-vision pm2 app uses a bare 'node' interpreter, so it follows the node user's nvm default alias, which other pm2 apps share. Document moving it to Node 22 with an absolute interpreter path instead of changing the default.
…its pm2 definition (#899) The app was started with a bare 'pm2 start server.js', so its definition lived only in pm2's state and its interpreter followed the shared nvm default alias. ecosystem.config.cjs reproduces it (fork mode, cwd, no args/env) with an absolute Node 22 interpreter path.
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.
Closes #899. Builds on #900 (#896/#898) and includes its two commits; merge #900 first and the diff here shrinks to the docs + CI changes.
What
DEPLOY.md, a new deploy guide for vision.hyphy.org. It covers:
node server.jsruns under pm2 apphyphy-vision).nvmrc) for both building and servingdistis non-empty beforersync --deletevX.Y.Zversion-bump + tag conventionDetails that could not be confirmed are marked TODO (maintainer): nginx config path, the pm2 definition and how it pins Node, the backup location, a canonical deep-link JSON, and the npm/GitHub Release policy.
README: the stale deployment section (
webpack/supervisor server.js) now links to DEPLOY.md.CI (
.github/workflows/nodejs.yml):fail-fast: false.server.jsafter the build (/and a?json=route).developbranch.Production note
At the last deploy, pm2 served on Node 17.9.1 (EOL) and the build shell defaulted to 23.3.0. The plan is to move both to Node 22, which DEPLOY.md documents. Until that switch is done on the host, the Node versions table describes the target, and the TODO under it says so.
Verification
yarn buildon the build: drop --openssl-legacy-provider so the build works on Node 16 through 23 (#896) #900 base: passes on Node 16.20.2, 18, 22 and 23.3.0 with no flags.yarn test: 5/5 pass.server.jsserves the build: 200 for/and for/fel?json=....