Skip to content
Open
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
5 changes: 5 additions & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@ opt_param_env_vars:
- {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*."}
- {env_var: "MASTODON_PROMETHEUS_EXPORTER_ENABLED", env_value: "", desc: "If set to `true`, Mastodon’s Ruby processes (web & Sidekiq) will enable the Prometheus instrumentation."}
param_usage_include_ports: true
param_ports:
- {external_port: "80", internal_port: "80", port_desc: "Port for web frontend"}
- {external_port: "443", internal_port: "443", port_desc: "Port for web frontend"}
opt_param_usage_include_ports: true
opt_param_ports:
- {external_port: "9394", internal_port: "9394", port_desc: "Port for Prometheus metrics"}
param_usage_include_vols: true
param_volumes:
- {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Contains all relevant configuration files."}
Expand Down Expand Up @@ -166,6 +170,7 @@ init_diagram: |
"mastodon:develop" <- Base Images
# changelog
changelogs:
- {date: "21.10.25:", desc: "Add prometheus exporter support."}
- {date: "20.10.25:", desc: "Add vips-heif."}
- {date: "06.06.25:", desc: "Rebase to Alpine 3.22, replace deprecated imagemagick with vips."}
- {date: "26.08.24:", desc: "Rebase to Alpine 3.20, enable [Active Record Encryption](https://github.com/mastodon/mastodon/pull/29831/files). Existing users should update their nginx confs to avoid http2 deprecation warnings."}
Expand Down
Empty file.
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-prom/notification-fd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5
10 changes: 10 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-prom/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

export RAILS_ENV=production
export HOME=/config
export PATH="${PATH}:/app/www/bin"

exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${PROMETHEUS_EXPORTER_PORT:-9394}" \
cd /app/www s6-setuidgid abc /app/www/bin/prometheus_exporter
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-prom/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
4 changes: 4 additions & 0 deletions root/init-hook
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# Disable the php-fpm service as the container doesn't use it
rm /etc/s6-overlay/s6-rc.d/user/contents.d/svc-php-fpm

if [[ ${MASTODON_PROMETHEUS_EXPORTER_ENABLED,,} != "true" ]]; then
rm /etc/s6-overlay/s6-rc.d/user/contents.d/svc-prom
fi

if [[ ${SIDEKIQ_ONLY,,} == "true" ]]; then
rm /etc/s6-overlay/s6-rc.d/user/contents.d/svc-mastodon
rm /etc/s6-overlay/s6-rc.d/user/contents.d/svc-nginx
Expand Down