3

i'm trying to deploy in production Redmine application. I heard that thin is the fastest ruby on rails webserver so I installed it. Now I have a really simple problem: i must start it every time i reboot the machine via cmd because there isn't a prebuilt windows service or something similar that allow me to autostart it. How could i fix the problem? I saw that there is a bat file, so i tried to make a C# windows service like this and it starts correctly but if I stop it the service stops but the webserver is still active and it will never shutdown. The only way to stop thin is to reboot the machine. Maybe I'm wrong, could someone post an example of how should i run thin as a windows service?

4

1 に答える 1

5

しばらく前にこれについてブログ投稿を書きましたが、そのほとんどはまだ適用できるはずです。それが役に立てば幸い。

しかし正直なところ、私は常に mongrel-service gem を使用して Windows にデプロイし、前に apache を構成して 3 つの mongrel 間の負荷分散を行います。はるかに簡単です。また、私にとって大きな利点は、-service で問題が発生した場合、thinmongrel-service が mongrel プロセスを保護している間、自動的に再起動せず、何らかの理由でダウンした場合に再度再起動することでした。私にとって、それは見逃せないものでした。

于 2010-12-06T23:16:08.913 に答える