The app service needs to start as root in order to apply the sed
changes for the custom character limit. However, the current command:
su -c "RAILS_ENV=production bundle exec rails s -p 3000"
also leaves Rails/Puma running as root.
As a result, uploaded media files can be created as root:root, while
Sidekiq runs as the mastodon user (991:991). This causes video
post-processing to fail because Sidekiq cannot correctly process some
of the generated media files.
This changes the final command to:
exec su -s /bin/sh -c \
"RAILS_ENV=production bundle exec rails s -p 3000"\
mastodon
The container can still perform the initial setup as root, but
Rails/Puma then runs as mastodon.
Tested on a real Co-op Cloud Mastodon deployment with Mastodon 4.5.18.
After the change:
The issue comes from `compose.character-limit.yml`.
The `app` service needs to start as `root` in order to apply the `sed`
changes for the custom character limit. However, the current command:
```sh
su -c "RAILS_ENV=production bundle exec rails s -p 3000"
```
also leaves Rails/Puma running as root.
As a result, uploaded media files can be created as root:root, while
Sidekiq runs as the mastodon user (991:991). This causes video
post-processing to fail because Sidekiq cannot correctly process some
of the generated media files.
This changes the final command to:
```sh
exec su -s /bin/sh -c \
"RAILS_ENV=production bundle exec rails s -p 3000" \
mastodon
```
The container can still perform the initial setup as root, but
Rails/Puma then runs as mastodon.
Tested on a real Co-op Cloud Mastodon deployment with Mastodon 4.5.18.
After the change:
- Rails/Puma runs as mastodon
- media files are created with compatible ownership
- Sidekiq can process uploaded videos correctly
- video uploads work again
Related to #63.
Fix made with LLM Chatgpt
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The issue comes from
compose.character-limit.yml.The
appservice needs to start asrootin order to apply thesedchanges for the custom character limit. However, the current command:
also leaves Rails/Puma running as root.
As a result, uploaded media files can be created as root:root, while
Sidekiq runs as the mastodon user (991:991). This causes video
post-processing to fail because Sidekiq cannot correctly process some
of the generated media files.
This changes the final command to:
The container can still perform the initial setup as root, but
Rails/Puma then runs as mastodon.
Tested on a real Co-op Cloud Mastodon deployment with Mastodon 4.5.18.
After the change:
Related to #63.
Fix made with LLM Chatgpt
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.