![]() ![]() Pre-setup command or path to a script on your local machine SSH options with no command-line flag, see ‘man ssh’ if true, you can start the same script several times which is usually not allowed by PM2 if false, PM2 will start without vizion features (versioning control metadata)Ī list of commands which will be executed after you perform a Pull/Upgrade operation from Keymetrics dashboardĭefaults to false. Application must be running for cron feature to work if false, PM2 will not restart your app if it crashes or ends peacefullyĪ cron pattern to restart your app. Time to wait before restarting a crashed app (in milliseconds). Number of consecutive unstable restarts (less than 1sec interval or custom time via min_uptime) before your app is considered errored and stop being restarted Instead of reload waiting for listen event, wait for nd(‘ready’) Shutdown an application with nd(‘shutdown’) instead of process.kill(pid, SIGINT) ![]() Time in milliseconds before sending a final SIGKILL Time in ms before forcing a reload if app not listening Min uptime of the app to be considered started Pid file path (default to $HOME/.pm2/pids/-.pid) If set to true, avoid to suffix logs file with the process id Output file path (default to $HOME/.pm2/logs/-out-.log)įile path for both output and error logs (disabled by default) Inject when doing pm2 restart app.yml -envĭefault to true, Įxcludes global variables starting with “REACT_” and will not allow their penetration into the cluster.Įrror file path (default to $HOME/.pm2/logs/-error-.log) human-friendly format : it can be “10M”, “100K”, “2G” and so on…Įnv variables which will appear in your app Your app will be restarted if it exceeds the amount of memory specified. List of regex to ignore some file or folder names by the watch feature Mode to start your app, can be “cluster” or “fork”, default forkĮnable watch & restart feature, if a file change in the folder or subfolder, your app will get reloaded Interpreter absolute path (default to node) String containing all arguments passed via CLI to script The directory from which your app will be launched Pm2 restart process.json -env developmentĪpplication behavior and configuration can be fine-tuned with the following attributes: General FieldĪpplication name (default to script filename without extension) Monitor your production applications with PM2.io. Learn how to deploy and update production applications easily. Learn how to do clean stop and restart to increase reliability. Learn how to declare all your application’s behavior options into a JSON configuration file. Pm2 start app.js -no-autorestart What’s next? ![]() Pm2 sendSignal SIGUSR2 my-app # Send system signal to script Pm2 ping # Ensure pm2 daemon has been launched Pm2 reset # Reset meta data (restarted time.) Pm2 delete all # Will remove all processes from pm2 list # Misc Pm2 delete 0 # Will remove process from pm2 list Pm2 restart 0 # Restart specific process id Pm2 reload all # Will 0s downtime reload (for NETWORKED apps) Pm2 reloadLogs # Reload all logs # Actions Pm2 logs # Display all processes logs in streaming Pm2 describe 0 # Display all information about a specific process Pm2 prettylist # Print process list in beautified JSON Pm2 jlist # Print process list in raw JSON Pm2 scale app 2 # Scales `app` up or down to 2 workers total # Listing Pm2 scale app +3 # Scales `app` up by 3 workers Pm2 start app.js -i max # Same as above, but deprecated. Pm2 start app.js -i 0 # Will start maximum processes with LB depending on available CPUs Download and save the file InstallSite24x7LinuxAgent.sh in your local machine.Pm2 start app.js -name my-api # Name process # Cluster mode.This is the same information you provide when you launch an EC2 instance, here again you have the option of passing the Linux agent shell script as user data.ĭownload our Linux agent shell script "InstallSite24x7LinuxAgent.sh", append the Device key and pass it as user data to run the script when the instance starts. The launch configuration template will contain information about the EC2 instance - ID of the instance AMI, instance type, security group, etc. This template will be used to launch EC2 instances. Site24x7_Linux_64bit.install -i -key=\n"]]Ĭreate an AutoScaling launch configuration template and assign it to the AutoScaling group. "sudo chmod 755 Site24x7_Linux_64bit.install\n", ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |