土曜日, 11月 14, 2009

Configuring Mongrel

From P639 Agile Web Development with Rails Third Edition, The Pragmatic Bookshelf
# On your local computer
$ mongrel_rails cluster::configure -e production -p 8000 -a 127.0.0.1 -N 2 -c /deploy/path/current
The -p 8000 parameter specifies that the mongrel instances will start up on ports beginning with 8000 on your deployment server. The -a 127.0.0.1 parameter will set up Mongrel to listen to the localhost interface. The -N 2 parameter indicates that two instances of Mongrel will be started. And, the -c /deploy/path/current argument is where your application will be deployed to on the remote server. Note that the word current in this path is required: the /deploy/path part is the path to your application, and current is a directory that Capistrano creates inside that application structure.In the Capistrano recipes that follow, the deployment path is set to /Library/Rails followed by the name of your application. If you follow this scheme for an application named blog, the -c option in the previous example would read -c /Library/Rails/blog/current.
This command creates the file mongrel_cluster.yml in your application’s config directory. It is essential that you add this file to your version control repository.


0 件のコメント: