0.01
No release in over 3 years
Low commit activity in last 3 years
Adds a multi-environment yml configuration file to mina. Environment configuration is dynamically created by the definitions in the deploy.yml file.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0

Runtime

>= 0
 Project Readme

Mina::Config

Adds a multi-environment yml configuration file to mina. Environment configuration is dynamically created by the definitions in the deploy.yml file.

As of right now the gem does require you to use rvm and have a .ruby-version file if you are doing a Ruby deployment.

Installation

Add this line to your application's Gemfile:

gem 'mina-config', require: false

And then execute:

$ bundle

Or install it yourself as:

$ gem install mina-config

Usage

Require mina/config in config/deploy.rb:

require 'mina/config'
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'

...

task setup: :environment do
  ...
end

desc 'Deploys the current version to the server.'
task deploy: :environment do
  ...
end

At the moment the gem requires usage of rvm. Add the following to config/deploy.rb with the path to your rvm install:

set :rvm_path, '/usr/local/rvm/scripts/rvm'

Then run the config initializer:

$ mina config:init

It will create config/deploy.yml. Use this file to define stage-specific configuration.

common: &common
      app: Mina_config
      repository: git@github.com:zmckenzie/mina-config.git
      shared_paths: ['config/database.yml', 'log']
staging:
      <<: *common
      domain: staging.example.com
      user: example
      branch: staging

Now deploy staging with:

$ mina deploy

Or specify a stage explicitly:

$ mina staging deploy
$ mina production deploy

Contributing

  1. Fork it ( http://github.com/zmckenzie/mina-config/fork )
  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