Permalink
Browse files

updated docs

  • Loading branch information...
1 parent bea3127 commit 2947c8a2a2795aa8ae21967c26f563b35992a502 @jnewland jnewland committed Dec 18, 2008
Showing with 106 additions and 17 deletions.
  1. +106 −17 README.textile
View
@@ -1,32 +1,121 @@
-h1. Railsmachine
+h1. Five Minute Rails Application Deployment
-A set of capistrano recipes for simplifying the deployment of Rails applications.
+Ready to deploy your Rails application to "Rails Machine":http://railsmachine.com/? Follow these steps and you'll have it running in no time! Free to utilize Rails Machine's Ask Us Anything Support and "contact us with any questions you have along the way":https://support.railsmachine.com/index.php?pg=request.
-The deployment process looks like this:
+h2. Update Gems
+
+Install the latest version of the "railsmachine gem":http://github.com/railsmachine/railsmachine:
+
+<code>
+ <pre>
+ $ sudo gem install railsmachine
+ </pre>
+</code>
+
+h2. Setup Capistrano
+
+Capify your application:
+
+<code>
+ <pre>
+ $ capify .
+ </pre>
+</code>
+
+h2. Configure Capistrano for Rails Machine
+
+The following step customizes your @config/deploy.rb@ with two bits of information you provide:
+
+* *@--name@*: a simple name for your application. no spaces, please.
+** example: my-cool-app
+* *@--domain@*: the primary domain name for your application. please omit the 'www' - we automaticaly alias www.whateveryouprovide.com as needed.
+** example: my-cool-app.com
+
+<code>
+ <pre>
+ $ railsmachine --apply-to . --name my-cool-app --domain my-cool-app.com
+ </pre>
+</code>
+
+Please note that the domain name provided will need to be correctly pointed at your Rails Machine account. If you don't have a DNS provider, we've been more than happy with "DNS Made Easy":http://dnsmadeeasy.com.
+
+h2. Update Database Config
+
+Update your applications @config/database.yml@'s section with your desired MySQL datbase name, username, and password. The database and user will be created for you in a forthcoming step.
+
+h2. Application Setup
+
+Rails Machine defaults to using mongrel + mod_proxy_balancer to run your Rails Application. If you'd like to switch to "Phusion Passenger":http://www.modrails.com/, edit the line in your application's @config/deploy.rb@ that begins @set :app_server@ to reflect your choice. For example:
+
+<code>
+ <pre>
+ set :app_server, :passenger
+ </pre>
+</code>
+
+Run the following Capistrano task to setup your MySQL databases and configure your application servers (mongrel/passenger):
<code>
<pre>
- cd <app_directory>
- capify .
- railsmachine --apply-to . --name <app_name> --domain <yourdomain.com>
- cap repos:setup
- cd ../<app_name>_machine
- cap servers:setup deploy:cold
+ $ cap servers:setup
</pre>
</code>
-Under the default configuration the gem will use these directories:
+h2. Source Control
+
+h3. If you're already using Source Control...
+
+...edit the lines in your application's @config/deploy.rb@ that begin @set :repository@ and @set :repository@. For example:
+
+<code>
+ <pre>
+ set :scm, :git
+ set :repository, "git@github.com:yourname/my-cool-app.git"
+ </pre>
+</code>
+
+h3. If you're not yet using Source Control...
+
+...you can easily setup a Git/Subversion repository on your Rails Machine. Subversion is the default, edit the line in your application's @config/deploy.rb@ that begins @set :scm@ if you'd like to change it to git. For example:
+
+<code>
+ <pre>
+ set :scm, :git
+ </pre>
+</code>
+
+Next, run the following task to import your application into a Git/SVN repository on your Rails Machine:
+
+<code>
+ <pre>
+ $ cap repos:setup
+ </pre>
+</code>
+
+h2. Initial Deploy
+
+That's it! You're ready to use Capistrano to deploy your app for the first time:
+
+<code>
+ <pre>
+ $ cap deploy:cold
+ </pre>
+</code>
+
+Once that's done, open your application in a web browser and test it out!
+
+To perform a subsequent deploy with Capistrano:
<code>
<pre>
- /var/www/apps/ - Rails applications
- /etc/httpd/conf/apps/ - Apache configurations
- /var/run/mongrel_cluster/ - Mongrel pid files
- /etc/mongrel_cluster/ - Mongrel cluster configurations
+ $ cap deploy
</pre>
</code>
-h3. Requirements
+or, if you need to run migrations as well:
-* a 'deploy' system account with write access to the above directories.
-* You also need a 'deploy' mysql account with all privileges on *.* and grant option.
+<code>
+ <pre>
+ $ cap deploy:migrations
+ </pre>
+</code>

0 comments on commit 2947c8a

Please sign in to comment.