简体   繁体   中英

Create stand-alone system services in Ruby

I want to build application which servers as a stand-alone system service, always run on the backend and servers a front-end with a web interface.

Like we do in Linux /etc/init.d/apache2 start , Same as I want to server my application /etc/init.d/myapp start .

My major target is to deliver on Linux specially Ubuntu, whole app would be in plain Ruby and front-end would be in Sinatra.

I want to make it install with simple, gem install my_app and command line features get available to start the service. The application would be doing heavily processing and database insertion. And I want that its configurations must be set as in pure linux fashion, like /etc/apache2/apache2.conf

Can any one guide me in it? Also if possible, i want to secure the code, is there any possibilities for it?

I am using the Daemon-Kit gem for the same requirements. Works very well in production. The only thing it does not include is the configuration with a .conf file, but it's easy to do it yourself with Ruby code. You can deploy with Capistrano, no need to install.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM