All Projects → hyperoslo → Capistrano Foreman

hyperoslo / Capistrano Foreman

Licence: other
Capistrano tasks for foreman and upstart.

Programming Languages

ruby
36898 projects - #4 most used programming language

Capistrano Foreman

Code Climate

Capistrano tasks for foreman and upstart/systemd.

Installation

$ gem install capistrano-foreman

Add this to your Capfile:

require 'capistrano/foreman'

# Default settings
set :foreman_use_sudo, false # Set to :rbenv for rbenv sudo, :rvm for rvmsudo or true for normal sudo
set :foreman_roles, :all
set :foreman_init_system, 'upstart'
set :foreman_export_path, ->{ File.join(Dir.home, '.init') }
set :foreman_app, -> { fetch(:application) }
set :foreman_app_name_systemd, -> { "#{ fetch(:foreman_app) }.target" }
set :foreman_options, ->{ {
  app: application,
  log: File.join(shared_path, 'log')
} }

See exporting options for an exhaustive list of foreman options.

Usage

Export Procfile to upstart/systemd:

$ bundle exec cap production foreman:export

Restart the application services:

$ bundle exec cap production foreman:restart

Credits

Hyper made this. We're a digital communications agency with a passion for good code, and if you're using this library we probably want to hire you.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].