README.md in negroku-1.1.4 vs README.md in negroku-1.1.5
- old
+ new
@@ -1,79 +1,155 @@
Negroku
=======
Negroku is an opinionated collection of recipes for capistrano.
-The goal is to be able to deploy **ruby on rails applications** and **static websites** without the hassle of configure and define all the stuff involved in an application deployment.
+The goal is to be able to deploy **ruby on rails applications** and **static websites** without the hassle of configuring and defining all the stuff involved in an application deployment.
-All the server configurations pre-defined in the configuration files generated by negroku are targeted oto this generic [configuration guide](https://github.com/platanus/guides/tree/master/deployment).
+All the server settings pre-defined in the configuration files generated by negroku are targeted to this server generic [configuration guide](https://github.com/platanus/guides/tree/master/deployment). Although in most cases you can customize those settings.
Installation
------------
-Just install negroku as a global gem.
+Install negroku as a global gem.
- gem install negroku
+```shell
+$ gem install negroku
+```
+Add the negroku gem to your `Gemfile` development group to lock the version your are going to use.
+
+```ruby
+group :development do
+ gem 'negroku', '1.1.4'
+end
+```
+
+You will need to add to your Gemfile these two gems:
+
+```ruby
+group :assets do
+ gem 'therubyracer', :platforms => :ruby
+end
+
+group :production do
+ gem 'unicorn'
+end
+```
+
+Then execute
+
+```shell
+$ bundle install
+```
+
+**Note:** Add the `therubyracer` gem only if your are going to use the assets precompile of a rails project.
+
## Getting started
-1. Bootpstrapp your app (behind the scene it runs `capify .` plus some customizations)
+1. Create your app executing the following command, and just follow the on-screen questions.
- It will add this files to your proyect, this is the same structure that capistrano expect when using multistage extensions
+ ```
+ $ negroku app create
+ ```
+ ####Give your application a name
+
+ This will be used to create the app folder structure in the server and to name some files, for example, the log files.
+
+
+ ####Please choose your repository
+
+ You'll need to choose the git respository where your are going to store your project. Typically a GitHub repository, it can be any repository that the server has access to.
+
+ If you have already initializated your git repository for the project, you'll be offered to choose the remotes of the current repo.
+
+ ####Target servers
+
+ You'll need to choose the server address where the project will be deployed and the hostname that will be used by *nginx* to host the application. Negroku will ask this for two stage servers (staging, production)
+
+ *Note:* Refer to the [negroku config taks](#config-task) to add some default servers to the negroku configuration.
+
+
+1. The `app create` command will bootpstrapp your app (behind the scenes it will run the capistrano command `capify .` and add some customizations)
+
+ Some files and folders will be added to your project, this is the same structure that capistrano expects when using multistage extensions
+
```
project_root
|--- Capfile # Capistrano load file
+--- config
|--- deploy.rb # Global setting for all environments
+--- deploy
|--- production.rb # Specific settings for production server
+--- staging.rb # Specific settings for staging server
```
- It will also add to your Gemfile two gems
+1. Configure your specific settings in the files created above
- ```ruby
- group :assets do
- gem 'therubyracer', :platforms => :ruby
- end
+ ####Common settings for all stages `deploy.rb`
- group :production do
- gem 'unicron'
- end
+ Here you can add all the settings that are common to all the stage severs.
+
+ ```ruby
+ #You may want to change the stages and the default stage
+ set :stages, %w(production staging)
+ set :default_stage, "staging"
```
-1. Configure your specific settings in the files created above
-1. Prepare your server for your application with `cap deploy:setup` task
+ ####Per-stage settings `staging.rb` `production.rb`
-1. Deploy you application with `cap deploy` task
+ Here you can add all the settings that are specific to the stage.
-### Type of applications supported
+ ```ruby
+ #You may want to change the repository branch for each stage.
+ set :branch, "production" # Optional, defaults to master
+ ```
-You can bootstrap with negroku two type of applications, ruby on rails applications with native capistrano support and static web sites with specific recipes.
+1. Prepare the server for your application executing
- negroku app create <appname>
+ ```shell
+ $ cap deploy:setup
+ ```
- Follow the in-screen instructions and questions.
+1. Commit and push the changes to the repository
-2.
+1. Configure all your environmental variables for your project using the [negroku env taks](#env-task)
-#Static websites
+1. Deploy you application for the first time executing
+ ```shell
+ $ cap deploy:cold # for the default stage
+ $ cap production deploy:cold # for the production stage
+ ```
+
+ For all the next following deploys, you should execute
+
+ ```shell
+ $ cap deploy # for the default stage
+ $ cap production deploy # for the production stage
+ ```
+
The CLI
-------
Negroku also provides a simple CLI that helps to initialize the deployment of your project and that wraps some tasks from its recipes collection.
### App task
+*comming soon...*
+
### Env task
+*comming soon...*
+
### Config task
+*comming soon...*
+
Included recipes
----------------
To achieve this goal negroku provides a set of pre-configured capistrano recipes and deploy configuration files in order to streamline the process to deploy a new application.
@@ -121,11 +197,17 @@
Customizing the recipes
-----------------------
-Aside of prodefine some ways of doing the deployments, negroku is very flexible. This flexibility is inherit from capistrano where you can extend negroku with your recipes, overide existing ones, and modify every configuration you want.
+Aside of predefining some ways of doing the deployments, negroku is very flexible. This flexibility is inherited from capistrano, so you can extend negroku with your recipes, overide existing ones, and modify every configuration you want.
+Contributing
+------------
-
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request