diff --git a/readme-vars.yml b/readme-vars.yml index fe3893f..2654f26 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -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: @@ -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). diff --git a/root/etc/s6-overlay/s6-rc.d/init-mastodon-config/run b/root/etc/s6-overlay/s6-rc.d/init-mastodon-config/run index 20fa60b..9920b3b 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-mastodon-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-mastodon-config/run @@ -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