Open twn39 opened 6 years ago
PHP-fpm 示例:
[Unit]
Description=The PHP 7.2 FastCGI Process Manager
Documentation=man:php-fpm7.2(8)
After=network.target
[Service]
Type=notify
PIDFile=/run/php/php7.2-fpm.pid
ExecStart=/usr/sbin/php-fpm7.2 --nodaemonize --fpm-config /etc/php/7.2/fpm/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
[Install]
WantedBy=multi-user.target
Gunicorn 示例:
[Unit]
Description=a flask application run on gunicorn.
After=network.target
[Service]
PIDFile=/run/gunicorn/pid
WorkingDirectory=/home/vagrant/pyapp
ExecStart=/home/vagrant/miniconda/bin/gunicorn -w 4 -b 0.0.0.0:8080 application:app
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
简单示例: