mastodon-init-dirs should have the same environment as the other services, as it also calls rake. Especially RAILS_ENV was missing.
Co-authored-by: Happy River <happyriver93@runbox.com> Co-authored-by: ash lea <ashkitten@users.noreply.github.com> Co-authored-by: Justin Humm <justin.humm@posteo.de>