Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyperoslo/capistrano-foreman
Capistrano tasks for foreman and upstart.
https://github.com/hyperoslo/capistrano-foreman
Last synced: 3 months ago
JSON representation
Capistrano tasks for foreman and upstart.
- Host: GitHub
- URL: https://github.com/hyperoslo/capistrano-foreman
- Owner: hyperoslo
- License: mit
- Created: 2012-06-13T07:28:17.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2023-04-21T20:03:34.000Z (over 1 year ago)
- Last Synced: 2024-07-10T17:48:20.672Z (4 months ago)
- Language: Ruby
- Size: 54.7 KB
- Stars: 137
- Watchers: 9
- Forks: 59
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Capistrano Foreman
[![Code Climate](https://img.shields.io/codeclimate/github/hyperoslo/capistrano-foreman.svg?style=flat)](https://codeclimate.com/github/hyperoslo/capistrano-foreman)
Capistrano tasks for foreman and upstart/systemd.
## Installation
$ gem install capistrano-foreman
Add this to your `Capfile`:
```ruby
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](http://ddollar.github.io/foreman/#EXPORTING) 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.