From 3f3c817c8ed75ee88a9d5be876c2a00e982cebac Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Tue, 28 Nov 2023 18:55:53 +0200 Subject: [PATCH] add precompile of assets --- manifests/init.pp | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 }