Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support no_chown option (glitch) #70

Merged
merged 2 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ opt_param_env_vars:
- { env_var: "SIDEKIQ_DEFAULT", env_value: "false", desc: "Set to `true` on the main container if you're running additional sidekiq instances. It will run the `default` queue."}
- { env_var: "SIDEKIQ_THREADS", env_value: "5", desc: "The number of threads for sidekiq to use. See [notes](https://docs.joinmastodon.org/admin/scaling/#sidekiq-threads)."}
- { env_var: "DB_POOL", env_value: "5", desc: "The size of the DB connection pool, must be *at least* the same as `SIDEKIQ_THREADS`. See [notes](https://docs.joinmastodon.org/admin/scaling/#sidekiq-threads)."}
- { env_var: "NO_CHOWN", env_value: "", desc: "Set to `true` to skip chown of /config on init. *READ THE APPLICATION NOTES BEFORE SETTING THIS*."}

param_usage_include_ports: true
param_ports:
Expand Down Expand Up @@ -101,6 +102,12 @@ app_setup_block: |

All containers must share the same `/config` mount and be on a common docker network.

### NO_CHOWN Option

On larger Mastodon instances, our init process to verify that permissions are set correctly can noticeably slow down the container startup. If you are experiencing this, you can set `NO_CHOWN` to `true` to skip that step of the init.

*Do NOT set this on first run of the container. If you enable this option you are taking full responsibility for ensuring that the permissions in your /config mount are correct. If you're even slightly unsure, don't set it.*

### Strict reverse proxies

This image automatically redirects to https with a self-signed certificate. If you are using a reverse proxy which validates certificates, you need to [disable this check for the container](https://docs.linuxserver.io/faq#strict-proxy).
Expand Down
6 changes: 4 additions & 2 deletions root/etc/s6-overlay/s6-rc.d/init-mastodon-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ if [[ ${SIDEKIQ_ONLY,,} != "true" ]]; then
s6-setuidgid abc /usr/bin/bundle exec rails db:prepare
fi

lsiown -R abc:abc \
/config
if [[ ${NO_CHOWN,,} != "true" ]]; then
lsiown -R abc:abc \
/config
fi