Index: modules/discourse/manifests/init.pp |
=================================================================== |
--- a/modules/discourse/manifests/init.pp |
+++ b/modules/discourse/manifests/init.pp |
@@ -28,34 +28,26 @@ class discourse inherits private::discou |
} |
package {'bundler': |
ensure => present, |
provider => gem |
} |
$gem_dependencies = ['git', 'build-essential', 'ruby1.9.1-dev', 'libxml2-dev', |
- 'libxslt-dev', 'libpq-dev', 'libfcgi-dev'] |
+ 'libxslt-dev', 'libpq-dev'] |
package {$gem_dependencies: ensure => present} |
file {'/opt/discourse': |
ensure => directory, |
mode => 755, |
owner => discourse, |
group => www-data |
} |
- file {'/opt/discourse/discourse.fcgi': |
- mode => 755, |
- owner => discourse, |
- group => www-data, |
- source => 'puppet:///modules/discourse/discourse.fcgi', |
- require => Exec['fetch-discourse'] |
- } |
- |
file {'/opt/discourse/config/database.yml': |
mode => 600, |
owner => discourse, |
group => www-data, |
source => 'puppet:///modules/discourse/database.yml', |
require => Exec['fetch-discourse'] |
} |
@@ -107,17 +99,16 @@ class discourse inherits private::discou |
environment => ["DISCOURSE_SECRET=${secret}", "AIRBRAKE_KEY=${airbrake_key}"], |
user => discourse, |
group => www-data, |
timeout => 0, |
logoutput => true, |
require => [Package['bundler', 'postgresql-contrib', $gem_dependencies], |
User['discourse'], File['/etc/sudoers.d/discourse'], |
Exec['fetch-discourse'], |
- File['/opt/discourse/discourse.fcgi'], |
File['/opt/discourse/config/database.yml'], |
File['/opt/discourse/config/redis.yml']] |
} |
Discourse::Sitesetting <| |> { |
require => Exec['/usr/local/bin/init-discourse'] |
} |
@@ -151,35 +142,27 @@ class discourse inherits private::discou |
value => 't' |
} |
discourse::admin {$admins: |
ensure => present, |
require => Exec['/usr/local/bin/init-discourse'] |
} |
- class {'spawn-fcgi':} |
- |
- spawn-fcgi::pool {'discourse-fastcgi': |
- ensure => 'present', |
- user => 'discourse', |
- group => 'www-data', |
- mode => 0664, |
- fcgi_app => '/opt/discourse/discourse.fcgi', |
- socket => '/tmp/discourse-fastcgi.sock', |
- require => File['/opt/discourse/discourse.fcgi'], |
- } |
- |
Discourse::Customservice <| |> { |
user => 'discourse', |
workdir => '/opt/discourse', |
env => ['GEM_HOME=~discourse/.gems', 'RAILS_ENV=production'], |
require => Exec['/usr/local/bin/init-discourse'] |
} |
+ discourse::customservice {'discourse-thin': |
+ command => 'bundle exec thin -S /tmp/discourse-thin.sock start' |
+ } |
+ |
discourse::customservice {'sidekiq': |
command => 'bundle exec sidekiq' |
} |
discourse::customservice {'clockwork': |
command => 'bundle exec clockwork config/clock.rb' |
} |