Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pm2: init at 4.5.0 #99992

Merged
merged 1 commit into from Oct 13, 2020
Merged

pm2: init at 4.5.0 #99992

merged 1 commit into from Oct 13, 2020

Conversation

jeremyschlatter
Copy link
Contributor

@jeremyschlatter jeremyschlatter commented Oct 8, 2020

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@aanderse
Copy link
Member

aanderse commented Oct 8, 2020

See #86840 and #99617.

@jeremyschlatter jeremyschlatter changed the title nodePackages.pm2: init at 4.5.0 pm2: init at 4.5.0 Oct 8, 2020
@jeremyschlatter
Copy link
Contributor Author

Whoops, I didn't notice those other pm2 PRs when I opened this. Thanks for linking them.

Tempted to close this one, but I'll leave it open for now in case it's easier to merge. (The other two currently have merge conflicts.)

@jeremyschlatter
Copy link
Contributor Author

@jtojnar Would you be up for reviewing this?

I'm still learning how the review process works around here. 😅 I've had a couple of packages merged so far, but the people who merged them showed up by magic and I don't know who to ask for help when that doesn't happen.

@jtojnar
Copy link
Contributor

jtojnar commented Oct 13, 2020

There is not really much to review. Let’s just merge this before there are conflicts again.

@jtojnar jtojnar merged commit 22ac861 into NixOS:master Oct 13, 2020
@adminy
Copy link
Contributor

adminy commented Jul 31, 2023

root in ~/home on master ● ● λ pm2 startup
[PM2] Init System found: systemd
Platform systemd
Template
[Unit]
Description=PM2 process manager
Documentation=https://pm2.keymetrics.io/
After=network.target

[Service]
Type=forking
User=root
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
Environment=PATH=/run/wrappers/bin:/root/.nix-profile/bin:/etc/profiles/per-user/root/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/nix/store/pb6a5bb4z4i8y8r85kmxqq3q7h0si9pw-nodejs-18.16.1/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
Environment=PM2_HOME=/root/.pm2
PIDFile=/root/.pm2/pm2.pid
Restart=on-failure

ExecStart=/nix/store/kp4jprgxfkr2byxnav6didr8lmypvj65-pm2-5.3.0/lib/node_modules/pm2/bin/pm2 resurrect
ExecReload=/nix/store/kp4jprgxfkr2byxnav6didr8lmypvj65-pm2-5.3.0/lib/node_modules/pm2/bin/pm2 reload all
ExecStop=/nix/store/kp4jprgxfkr2byxnav6didr8lmypvj65-pm2-5.3.0/lib/node_modules/pm2/bin/pm2 kill

[Install]
WantedBy=multi-user.target

Target path
/etc/systemd/system/pm2-root.service
Command list
[ 'systemctl enable pm2-root' ]
[PM2] Writing init configuration in /etc/systemd/system/pm2-root.service

Error:

[PM2][ERROR] Failure when trying to write startup script
EROFS: read-only file system, open '/etc/systemd/system/pm2-root.service'
root in ~/home on master ● ● λ 

@dotlambda dotlambda mentioned this pull request Jan 22, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants