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

How to interface with forever on deployments? #1107

Open
Alex-R-A opened this issue May 24, 2021 · 1 comment
Open

How to interface with forever on deployments? #1107

Alex-R-A opened this issue May 24, 2021 · 1 comment

Comments

@Alex-R-A
Copy link

Hello, I am in process of writing bash files to get status of node apps running and start/stop them. There is a number of apps on my server.

Is there a cleaner way to get the "forever list" output?

My issue that parsing the "forever list" output is not 100% workable, as other people can move column order, etc. It makes a reliable parsing a big pain. Is there a way to get the data about what is currently running in json format or something that won't change based on someone's customization (like having different column order or hiding/showing columns)?

@Segmentational
Copy link

Ultimately forever is used to place a process into the background -- allowing any established PTY/TTY device to hang-up without also destroying the process (a good ol' daemon process).

You could use a daemon-manager to orchestrate control; daemon-managers are going to be dependent upon operating systems.

Commonly, sysctl, systemctl, initctl, systemd are found on various linux flavors. Configuring what is called a "service" or Unit File is rather straight forward.

Now, for ExecStart commands, instead of running the full path to npm, you'd instead provide the full path to forever -- followed with any flags and additional full-system paths as input. Run command -v forever to get that location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants