PM2
supervisor
Our great sponsors
PM2 | supervisor | |
---|---|---|
57 | 36 | |
40,661 | 8,210 | |
- | 0.7% | |
6.8 | 5.2 | |
9 days ago | about 1 month ago | |
JavaScript | Python | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
PM2
- PM2: Production Process Manager with a Built-In Load Balancer
-
AI for Web Devs: Deploying Your AI App to Production
There are plenty of ways to accomplish this: Docker, Kubernetes, Pulumis, etc., but I don’t like to add too much complexity. So for a basic app, I like to use PM2, a Node.js process manager with great features, including the ability to run our app in the background.
- PM2 Cheatsheet
- Is PM2 safe to install on my Mint?
-
How to get the count of your followers on dev.to
This project will consist of a single "index.js" file that you can deploy anywhere. I recommend using an Nginx reverse proxy and pm2 to keep the service running.
-
A Guide To Self-Hosting Web Apps On Ubuntu Servers
Your app should be running now. To be able to run the app in the background, I will use pm2. Stop your application using "Ctrl + C" and install pm2
- How to run Ec2-instance constantly?
-
I need help
https://www.npmjs.com/package/pm2 I found this package. It looks good and solves my problem, I think.
-
What happens if a node/express server gets an error/crashes in production?
Usually, you have something that restarts it for you. This is what a "process manager" is for, e.g. https://www.npmjs.com/package/pm2 But in most more advanced systems, this is taken care of for you differently. E.g. lambdas are restarted automatically based on how many instances are needed. If you are in container-land, there's usually a health check endpoint on your server that gets pinged by the container orchestrator, and if there's no response, it will kill and redeploy the container.
-
7 Tips to Build Scalable Node.js Applications
Additionally, it provides many more features to manage and visualize the processes. More details on PM2 can be found in their official documentation.
supervisor
-
An Internet of PHP
What I went with was having both a web server (Apache/Nginx) and PHP-FPM in the same container image, held together by Supervisor: http://supervisord.org/
In my case, the Dockerfile looks a bit like the following:
# Whatever base web server image you want, Debian/Ubuntu based here
-
Private Python Packages With devpi
As you can see there are several methods of running devpi server including cron, launchd (OSX service), nginx, Windows service, and supervisord. It also has a systemd service file which we can use to manage the service easily as Ubuntu uses it for primary service management. First off though we're going to need a proxy script to ensure that devpi is running in the virtual environment:
-
How can I get a lisp image to run in the background?
If it's a linux box you can make it a systemctl service, or you could use http://supervisord.org/.
-
Can I create/delete a Serverless VPC using Python?
I used supervisord to start my server and the cloud SQL proxy within the same container. That should work for your use case too.
-
Have you convinced anyone to use Nix or NixOS? Friends? Coworkers?
I convinced (previous) $dayjob to use it. It (nix) kind of hung around in the background with the team that used haskell for awhile, but became prime time when we needed to support a range of VMs running within client infrastructure that were in reality just running various python scripts under supervisord (http://supervisord.org/). The range of client machines (redhat, centos, debian, ubuntu all of different releases) with differing versions of python and supervisord were driving our support and devops teams crazy (but in a weird way - they thought they were being productive, and really enjoyed tweaking things to work with additional varieties of os...). Additionally, having to work around some minor pain points of supervisord (adding and removing config files and not interrupting running services) lead to the realisation that there was a perfectly good service manager at the bottom of the modern versions of these systems (systemd) and that nixos was just a nix wrapper around this systemd and it would only restart what actually changed...
-
Design of GNU Parallel
Here's more information about the configuration file format, in case anyone is curious: http://supervisord.org/configuration.html
My problem is that it's not always immediately clear how software that would normally run as a systemd service could be launched in the foreground instead. It usually takes a bit of digging around.
-
How We Built an Application to Test Student Docker Images for Database Systems University Course
This post is structured as follows: The first chapter Requirements and Design, describes the requirements for such an application, defines its processes, breaks it down into logical components, and proposes a data model. The second chapter Implementation, provides an introduction to key implementation issues, such as implementing asynchronous tasks and LDAP authentication. It also showcases the usage of Docker with Python SDK in the project, including network configuration, and describes the deployment configuration using supervisord. The final chapter summarizes the efforts and provides links to the code repositories.
-
Is it possible direct cron output to supervisord?
I have set up supervisord running cron job. However based on the discussion in supervisord GitHub, it is not possible to redirect cron's spawned command output to supervisord.
- rc.d script for Node.js application
-
MISP at scale on Kubernetes
The project MISP-Docker from Coolacid is providing a containerized version of the MISP solution. This all-in-one solution includes the frontend, background jobs, cronjobs and an HTTP Server (Nginx) all orchestrated by process manager tool called supervisor. External services such as the database and Redis aren’t part of the container but are necessary. We decided that this project is very a good starting point to scale the MISP on Kubernetes.
What are some alternatives?
Nodemon.io - Monitor for any changes in your node.js application and automatically restart the server - perfect for development
Docker Compose - Define and run multi-container applications with Docker
supervisor
honcho - Honcho: a python clone of Foreman. For managing Procfile-based applications.
forever - A simple CLI tool for ensuring that a given script runs continuously (i.e. forever)
Phusion Passenger - A fast and robust web server and application server for Ruby, Python and Node.js
psutil - Cross-platform lib for process and system monitoring in Python
naught - Zero downtime deployment for your Node.js server using builtin cluster API
systemd - The systemd System and Service Manager
node-windows - Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
RabbitMQ - Open source RabbitMQ: core server and tier 1 (built-in) plugins