feat(deploy): support systemd --user process manager for nextjs-ssr - #42
Open
keypair34 wants to merge 1 commit into
Open
feat(deploy): support systemd --user process manager for nextjs-ssr#42keypair34 wants to merge 1 commit into
keypair34 wants to merge 1 commit into
Conversation
Add an optional `process_manager` field to the nextjs-ssr deploy config. When set to "systemd", the deploy restarts the app via a git-owned `systemctl --user restart <pm2_app>.service` (no sudo, XDG_RUNTIME_DIR set, aborts if the unit is missing) instead of pm2. Default/"pm2" is unchanged. This replaces the pm2 daemon model that could leave an orphaned next-server holding the port after a restart (the karokowe.com gateway-timeout outage); a systemd --user unit is cgroup-supervised so restart reaps the whole tree, and linger makes it boot-persistent with no `pm2 save`. - model: process_manager: Option<String> on DeployConfig and Project - config: merge deploy_config.process_manager into project - deploy: restart_stanza() helper branches pm2 vs systemd, injected into the deploy script; unit tests for both branches - docs: smbcloud-deploy-nextjs skill "Process manager: systemd --user" Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Add an optional
process_managerfield to the nextjs-ssr deploy config. When set to "systemd", the deploy restarts the app via a git-ownedsystemctl --user restart <pm2_app>.service(no sudo, XDG_RUNTIME_DIR set, aborts if the unit is missing) instead of pm2. Default/"pm2" is unchanged.This replaces the pm2 daemon model that could leave an orphaned next-server holding the port after a restart (the karokowe.com gateway-timeout outage); a systemd --user unit is cgroup-supervised so restart reaps the whole tree, and linger makes it boot-persistent with no
pm2 save.Related Issue
Fixes #
Description
Type of Change
How Has This Been Tested?
cargo test --all-featuressmb <command>)Checklist
cargo check --workspacepassescargo clippy --workspace --tests -- -D warningspassescargo fmt --all -- --checkpassesunwrap()orexpect()calls in production codemod.rsfiles introducedCargo.tomland inherited with{ workspace = true }Release Notes