From eabd4e92e73835744d93ffd1d1f7e0a73de98920 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Wed, 23 Nov 2022 16:39:23 +0000 Subject: [PATCH 1/5] Don't chown /config/mastodon/ to speed up init --- root/etc/cont-init.d/50-config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index fbfad62..b32872b 100755 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -17,5 +17,4 @@ cd /app/www/ || exit 1 s6-setuidgid abc /usr/bin/bundle exec rails db:prepare -chown -R abc:abc \ - /config +find /config -path /config/mastodon/public/system -prune -o -exec chown abc:abc {} + From 94535578c48b045f264fb088058a2deae475e832 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Thu, 24 Nov 2022 18:08:29 +0000 Subject: [PATCH 2/5] Add proxying note --- readme-vars.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme-vars.yml b/readme-vars.yml index c8f52bc..e08ff61 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -79,6 +79,8 @@ app_setup_block: | This container *requires* separate postgres and redis instances to run. + If you are reverse proxying this container you must proxy the *https* port otherwise you will end up with a redirect loop. + We support all of the official [environment variables](https://docs.joinmastodon.org/admin/config) for configuration. In place of adding them all to your run/compose you can use an env file such as [this example](https://github.com/mastodon/mastodon/blob/main/.env.production.sample) from the upstream project. For more information check out the [mastodon documentation](https://docs.joinmastodon.org/). From 47974c8756265571578a9307a1e5b79546efb742 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sun, 27 Nov 2022 21:35:34 +0000 Subject: [PATCH 3/5] Don't recursively chown --- root/etc/cont-init.d/50-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index b32872b..247f820 100755 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -17,4 +17,4 @@ cd /app/www/ || exit 1 s6-setuidgid abc /usr/bin/bundle exec rails db:prepare -find /config -path /config/mastodon/public/system -prune -o -exec chown abc:abc {} + +chown abc:abc /config/mastodon/public/system From 8366b633746e75ba8c5f7edc117c3d4429cd2eb8 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sun, 27 Nov 2022 21:36:35 +0000 Subject: [PATCH 4/5] Consistency --- root/etc/cont-init.d/50-config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index 247f820..1deb1f4 100755 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -17,4 +17,5 @@ cd /app/www/ || exit 1 s6-setuidgid abc /usr/bin/bundle exec rails db:prepare -chown abc:abc /config/mastodon/public/system +chown abc:abc \ + /config/mastodon/public/system From f8cfb9546dbfc099530d0ec8226f561a8862f4f8 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sun, 27 Nov 2022 21:45:11 +0000 Subject: [PATCH 5/5] Tweak readme wording, add links --- README.md | 6 +++++- readme-vars.yml | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bf1f06d..c9b2ab8 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,10 @@ We support all of the official [environment variables](https://docs.joinmastodon For more information check out the [mastodon documentation](https://docs.joinmastodon.org/). +### 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). + ## Usage Here are some example snippets to help you get started creating a container. @@ -206,7 +210,7 @@ Container images are configured using parameters passed at runtime (such as thos | `-e SMTP_PASSWORD=` | SMTP password | | `-e SMTP_FROM_ADDRESS=notifications@example.com` | From address for emails send from Mastodon | | `-e S3_ENABLED=false` | Enable or disable S3 storage of uploaded files | -| `-e WEB_DOMAIN=mastodon.example.com` | This can be set if you want your server identifier to be different to the subdomain hosting Mastodon. See https://docs.joinmastodon.org/admin/config/#basic | +| `-e WEB_DOMAIN=mastodon.example.com` | This can be set if you want your server identifier to be different to the subdomain hosting Mastodon. See [https://docs.joinmastodon.org/admin/config/#basic](https://docs.joinmastodon.org/admin/config/#basic) | | `-e ES_HOST=es` | Elasticsearch server hostname | | `-e ES_PORT=9200` | Elasticsearch port | | `-e ES_USER=elastic` | Elasticsearch username | diff --git a/readme-vars.yml b/readme-vars.yml index e08ff61..fc2455d 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -49,7 +49,7 @@ param_env_vars: opt_param_usage_include_env: true opt_param_env_vars: - - { env_var: "WEB_DOMAIN", env_value: "mastodon.example.com", desc: "This can be set if you want your server identifier to be different to the subdomain hosting Mastodon. See https://docs.joinmastodon.org/admin/config/#basic"} + - { env_var: "WEB_DOMAIN", env_value: "mastodon.example.com", desc: "This can be set if you want your server identifier to be different to the subdomain hosting Mastodon. See [https://docs.joinmastodon.org/admin/config/#basic](https://docs.joinmastodon.org/admin/config/#basic)"} - { env_var: "ES_HOST", env_value: "es", desc: "Elasticsearch server hostname"} - { env_var: "ES_PORT", env_value: "9200", desc: "Elasticsearch port"} - { env_var: "ES_USER", env_value: "elastic", desc: "Elasticsearch username"} @@ -79,12 +79,14 @@ app_setup_block: | This container *requires* separate postgres and redis instances to run. - If you are reverse proxying this container you must proxy the *https* port otherwise you will end up with a redirect loop. - We support all of the official [environment variables](https://docs.joinmastodon.org/admin/config) for configuration. In place of adding them all to your run/compose you can use an env file such as [this example](https://github.com/mastodon/mastodon/blob/main/.env.production.sample) from the upstream project. For more information check out the [mastodon documentation](https://docs.joinmastodon.org/). + ### 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). + # changelog changelogs: - { date: "05.11.22:", desc: "Initial Release." } \ No newline at end of file