unicorn

Unicorn daemonizer for Rails/Non rails and Bundle/Non bundle apps

russmac

russmac

7,418 downloads

6,707 latest version

5.0 quality score

Version information

  • 0.1.6 (latest)
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released May 3rd 2016
This version is compatible with:
  • Debian

Start using this module

Documentation

russmac/unicorn — version 0.1.6 May 3rd 2016

puppet-unicorn

Creates a deamonized init script which is just original unicorn script modified and templated.

Works on debian jessie 8.3 with systemd

Could be useful to quickly spin up ruby apps for CI by wrappering with a define

see examples folder for example usage.

# Wrapper class see app.yaml
class wrapper_class(
  $ruby_apps=hiera('ruby_apps')
){

  $ruby_apps_keys=keys($ruby_apps)

  wrapper_define::generate{$ruby_apps_keys:
    app_data => $ruby_apps
  }

}

# wrapper define
define wrapper_define(
  $app_data,
  $self=$app_data[$name]
){
  
  unicorn::generate{ $name:
    app_root          => $self['app_root'],
    user              => $self['user'],                   # optional
    rails_env         => $self['rails_env'],              # optional
    bundle            => $self['bundle'],                 # optional
    app_socket        => $self['app_socket'],             # optional
    pid_file          => $self['pid_file'],               # optional
    worker_processes  => $self['worker_processes'],       # optional
    backlog           => $self['backlog'],                # optional
    timeout           => $self['timeout'],                # optional
  }

}