[program:task]
command=/opt/venv/bin/python -c "from task import main;main()"
autorestart=true
startretries=10
stdout_logfile=/var/log/cdnfly/task.log
stderr_logfile=/var/log/cdnfly/task.err
directory=/opt/cdnfly/master

[program:site_sync]
command=/opt/venv/bin/python -c "from task_site_sync import main;main()"
autorestart=true
startretries=10
stdout_logfile=/var/log/cdnfly/task.log
stderr_logfile=/var/log/cdnfly/task.err
directory=/opt/cdnfly/master

[program:cc_auto_switch]
command=/opt/venv/bin/python -c "from task_cc_auto_switch import main;main()"
autorestart=true
startretries=10
stdout_logfile=/var/log/cdnfly/task.log
stderr_logfile=/var/log/cdnfly/task.err
directory=/opt/cdnfly/master

[program:site_res_count]
command=/opt/venv/bin/python -c "from task_site_res_count import main;main()"
autorestart=true
startretries=10
stdout_logfile=/var/log/cdnfly/task.log
stderr_logfile=/var/log/cdnfly/task.err
directory=/opt/cdnfly/master

[program:master]
command=/opt/venv/bin/gunicorn --capture-output --log-level error --access-logfile /var/log/cdnfly/master.log --error-logfile /var/log/cdnfly/master.err --worker-class=gevent --worker-connections=1000 --workers=2 --timeout=180 --bind 0.0.0.0:88 --bind 0.0.0.0:80 route:app
autorestart=true
startretries=10
directory=/opt/cdnfly/master
environment=FLASK_APP="/opt/cdnfly/master/route.py"

[program:master-ssl]
command=/opt/venv/bin/gunicorn --certfile=/opt/cdnfly/master/conf/ssl.cert --keyfile=/opt/cdnfly/master/conf/ssl.key --capture-output --log-level error --access-logfile /var/log/cdnfly/master.log --error-logfile /var/log/cdnfly/master.err --worker-class=gevent --worker-connections=1000 --workers=2 --timeout=180 --bind 0.0.0.0:443 route:app
autorestart=true
startretries=10
directory=/opt/cdnfly/master
environment=FLASK_APP="/opt/cdnfly/master/route.py"

