欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

相关标签: puma systemd