diff --git a/manifests/init.pp b/manifests/init.pp index 8c586c8..9af3907 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -276,5 +276,18 @@ class mastodon ( } # db:create # RAILS_ENV=production rails assets:precompile + exec { 'assets_precompile': + command => "${mastodon_home}/live/bin/rails assets:precompile > ${mastodon_home}/assets_precompile_done", + creates => "${mastodon_home}/assets_precompile_done", + path => "${mastodon_home}/.rbenv/shims:${mastodon_home}/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + environment => [ + 'RAILS_ENV=production', + ], + user => $mastodon_user, + group => $mastodon_group, + cwd => "${mastodon_home}/live", + timeout => 0, + require => File["${mastodon_home}/live/.env.production"], + } # Apache::vhost }