Answer the question
In order to leave comments, you need to log in
How to run python modules with pm2?
An example of a command to run
python3 -m friendly-telegram
So far, I'm using a crutch with a file
# start.sh
python3 -m friendly-telegram
pm2 start start.sh --name ftg
Answer the question
In order to leave comments, you need to log in
https://pm2.keymetrics.io/docs/usage/application-d...
Example for python:
{
"apps": [{
"name": "app_name",
"script": "/the/app/path/my_app.py",
"args": ["-c", "my_config.prod.json"],
"instances": "1",
"wait_ready": true,
"autorestart": false,
"max_restarts": 5,
"interpreter" : "/path/to/venv/bin/python",
}]
}
In addition, you can do this:
pm2 start "any command with args" --name name
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question