2012-12-27 17 views
2

我写了一个Sinatra的小应用程序。如何部署sinatra应用程序只是瘦?

现在,在这个项目的根目录中,我运行“瘦启动”,它的工作原理。这只是一个小项目,只能在我的本地机器上运行。所以我不需要使用Nginx,我打算只使用“瘦”。

那么,应用程序应该在服务器启动时自动运行。我怎么能做到这一点?

我已经运行:

sudo thin install 
sudo update-rc.d -f thin defaults 

而且它似乎是薄可以自动运行。然而,我在哪里可以配置它来运行我的应用程序?

呃....也许这个问题与sinatra或瘦无关。我只需要在机器启动时自动运行一些东西。我不熟悉Linux o(////)

回答

2

据我所知,你需要将配置文件放置到/ etc/thin/ 我想你可以在/ etc/thin/thin中找到示例。 yml

--- 
user: www-data 
group: www-data 
pid: tmp/pids/thin.pid 
timeout: 30 
wait: 30 
log: log/thin.log 
max_conns: 1024 
require: [] 
environment: production 
max_persistent_conns: 512 
servers: 1 
threaded: true 
no-epoll: true 
daemonize: true 
socket: tmp/sockets/thin.sock 
chdir: /path/to/your/apps/root 
tag: a-name-to-show-up-in-ps aux 
相关问题