diff --git a/roles/mastodon-config/tasks/main.yml b/roles/mastodon-config/tasks/main.yml index a4e6cbe..aec0a5c 100644 --- a/roles/mastodon-config/tasks/main.yml +++ b/roles/mastodon-config/tasks/main.yml @@ -52,6 +52,14 @@ dest: /home/mastodon/live/.env.production become: true become_user: mastodon +- name: Precompile Mastodon static assets + shell: cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rails assets:precompile + environment: + RAILS_ENV: production + args: + executable: /bin/bash + become: true + become_user: mastodon - name: Run Mastodon database setup shell: cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rails db:setup environment: @@ -61,14 +69,6 @@ executable: /bin/bash become: true become_user: mastodon -- name: Precompile Mastodon static assets - shell: cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rails assets:precompile - environment: - RAILS_ENV: production - args: - executable: /bin/bash - become: true - become_user: mastodon - name: Add Mastodon media cache cleanup cronjob cron: name: "Mastodon media cache cleanup"