Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hfaran/supervisor-config-generator
Simple supervisord.conf generator using Jinja2
https://github.com/hfaran/supervisor-config-generator
Last synced: 22 days ago
JSON representation
Simple supervisord.conf generator using Jinja2
- Host: GitHub
- URL: https://github.com/hfaran/supervisor-config-generator
- Owner: hfaran
- License: mit
- Created: 2014-04-06T06:47:20.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-04-06T09:01:34.000Z (almost 11 years ago)
- Last Synced: 2024-11-02T13:42:21.213Z (2 months ago)
- Language: Python
- Size: 152 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Simple `supervisord.conf` Generator
===========================`gen_supervisor_config.py` will generate a basic `supervisord.conf` for you that should be mostly suitable for many situations. Of course, it is a configuration file you're generating so feel free to configure it after it is generated or hack the template to get the output you want.
## Usage
* Install `Jinja2` and grab this repository:
```bash
sudo pip install Jinja2
git clone https://github.com/hfaran/supervisor-config-generator.git
cd supervisor-config-generator
```* Just run `gen_supervisor_config.py` and fill in the prompts:
```bash
$ ./gen_supervisor_config.py
Would you like an inet_http_server section? [Y/n] Y
Enter desired inet_http_server port: 9001
Enter desired inet_http_server username: user
Enter desired inet_http_server password: pass
Enter name of program: mywebapp
Enter command to run to start program: ./my_web_app.py -p 80
Enter number of instances to run of program: 3
```* From that you will get an output like this:
```
[inet_http_server]
port=0.0.0.0:9001
username=user
password=pass[unix_http_server]
file=/tmp/mywebapp-supervisor.sock[supervisord]
logfile=/var/log/mywebapp/mywebapp-supervisord.log
logfile_maxbytes=10MB
logfile_backups=10
loglevel=warn
pidfile=/var/run/mywebapp-supervisord.pid
nodaemon=false
minfds=1024
minprocs=200
user=root
childlogdir=/var/log/mywebapp/[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface[supervisorctl]
prompt = mywebapp
serverurl=unix:///tmp/mywebapp-supervisor.sock[program:mywebapp-0]
command=./my_web_app.py -p 80
stderr_logfile = /var/log/mywebapp/stderr.log
stdout_logfile = /var/log/mywebapp/stdout.log[program:mywebapp-1]
command=./my_web_app.py -p 80
stderr_logfile = /var/log/mywebapp/stderr.log
stdout_logfile = /var/log/mywebapp/stdout.log[program:mywebapp-2]
command=./my_web_app.py -p 80
stderr_logfile = /var/log/mywebapp/stderr.log
stdout_logfile = /var/log/mywebapp/stdout.log
```