puma systemd 服务文件 博客分类: ubunturails配置 pumasystemd
程序员文章站
2024-03-21 15:58:10
...
puma.service
[Unit]
Description=Puma HTTP Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/data/app/azl/web/current
User=www
ExecStart=/usr/local/rvm/bin/rvm 2.3.1 exec bundle exec puma -C config/puma_server.rb --environment production
ExecStop=/usr/local/rvm/bin/rvm 2.3.1 exec bundle exec pumactl -F config/puma_server.rb stop
ExecReload=/usr/local/rvm/bin/rvm 2.3.1 exec bundle exec pumactl -F config/puma_server.rb puased-restart
KillMode=contro-group
Restart=on-failure
[Install]
WantedBy=multi-user.target
resque.service
[Unit]
Description=Resque Monitor
After=network.target
[Service]
Type=forking
ExecStart=/bin/sh -ec 'exec /bin/su - www -c "ruby /data/app/azl/web/current/monitor/resque_worker.rb 3 &"'
[Install]
WantedBy=multi-user.target
resque_schedule.service
[Unit]
Description=ResqueSchedule Monitor
After=network.target
[Service]
Type=forking
ExecStart=/bin/sh -ec 'exec /bin/su - www -c "ruby /data/app/azl/web/current/monitor/resque_scheduler.rb &"'
[Install]
WantedBy=multi-user.target
[Unit]
Description=Puma HTTP Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/data/app/azl/web/current
User=www
ExecStart=/usr/local/rvm/bin/rvm 2.3.1 exec bundle exec puma -C config/puma_server.rb --environment production
ExecStop=/usr/local/rvm/bin/rvm 2.3.1 exec bundle exec pumactl -F config/puma_server.rb stop
ExecReload=/usr/local/rvm/bin/rvm 2.3.1 exec bundle exec pumactl -F config/puma_server.rb puased-restart
KillMode=contro-group
Restart=on-failure
[Install]
WantedBy=multi-user.target
resque.service
[Unit]
Description=Resque Monitor
After=network.target
[Service]
Type=forking
ExecStart=/bin/sh -ec 'exec /bin/su - www -c "ruby /data/app/azl/web/current/monitor/resque_worker.rb 3 &"'
[Install]
WantedBy=multi-user.target
resque_schedule.service
[Unit]
Description=ResqueSchedule Monitor
After=network.target
[Service]
Type=forking
ExecStart=/bin/sh -ec 'exec /bin/su - www -c "ruby /data/app/azl/web/current/monitor/resque_scheduler.rb &"'
[Install]
WantedBy=multi-user.target