Restructure and cleaned up in preparation of new backup logic

This commit is contained in:
2025-07-15 23:51:51 +02:00
parent c8054ffbc3
commit af3ea9039c
106 changed files with 703 additions and 429 deletions

View File

@@ -3,7 +3,8 @@
web:
{% set container_port = 3000 %}
{% set container_healthcheck = 'health' %}
image: "{{ applications | get_app_conf(application_id, 'images.' ~ application_id, True) }}"
container_name: {{ mastodon_name }}
image: "{{ mastodon_image }}:{{ mastodon_version }}"
{% include 'roles/docker-container/templates/base.yml.j2' %}
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p {{ container_port }}"
{% include 'roles/docker-container/templates/healthcheck/wget.yml.j2' %}
@@ -17,7 +18,8 @@
streaming:
{% set container_port = 4000 %}
{% set container_healthcheck = 'api/v1/streaming/health' %}
image: "{{ applications | get_app_conf(application_id, 'images.streaming', True) }}"
container_name: {{ mastodon_streaming_name }}
image: "{{ mastodon_streaming_image }}:{{ mastodon_streaming_version }}"
{% include 'roles/docker-container/templates/base.yml.j2' %}
command: node ./streaming
{% include 'roles/docker-container/templates/healthcheck/wget.yml.j2' %}
@@ -27,7 +29,8 @@
{% include 'roles/docker-container/templates/networks.yml.j2' %}
sidekiq:
image: "{{ applications | get_app_conf(application_id, 'images.mastodon', True) }}"
container_name: {{ mastodon_sidekiq_name }}
image: "{{ mastodon_image }}:{{ mastodon_version }}"
{% include 'roles/docker-container/templates/base.yml.j2' %}
command: bundle exec sidekiq
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
@@ -40,5 +43,5 @@
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
redis:
data:
name: "{{ mastodon_volume }}"
{% include 'roles/docker-compose/templates/networks.yml.j2' %}

View File

@@ -5,7 +5,7 @@
LOCAL_DOMAIN={{domains | get_domain(application_id)}}
ALTERNATE_DOMAINS="{{ domains.mastodon[1:] | join(',') }}"
SINGLE_USER_MODE={{applications.mastodon.single_user_mode}}
SINGLE_USER_MODE={{ applications | get_app_conf(application_id, 'single_user_mode', True) }}
# Credentials
@@ -13,15 +13,15 @@ SINGLE_USER_MODE={{applications.mastodon.single_user_mode}}
# -------
# Make sure to use `bundle exec rails secret` to generate secrets
# -------
SECRET_KEY_BASE= {{applications.mastodon.credentials.secret_key_base}}
OTP_SECRET= {{applications.mastodon.credentials.otp_secret}}
SECRET_KEY_BASE= {{ applications | get_app_conf(application_id, 'credentials.secret_key_base') }}
OTP_SECRET= {{ applications | get_app_conf(application_id, 'credentials.otp_secret') }}
# Web Push
# --------
# Generate with `bundle exec rails mastodon:webpush:generate_vapid_key`
# --------
VAPID_PRIVATE_KEY= {{applications.mastodon.credentials.vapid_private_key}}
VAPID_PUBLIC_KEY= {{applications.mastodon.credentials.vapid_public_key}}
VAPID_PRIVATE_KEY= {{ applications | get_app_conf(application_id, 'credentials.vapid_private_key') }}
VAPID_PUBLIC_KEY= {{ applications | get_app_conf(application_id, 'credentials.vapid_public_key') }}
# Encryption secrets
# ------------------
@@ -29,9 +29,9 @@ VAPID_PUBLIC_KEY= {{applications.mastodon.credentials.vapid_public_key}}
# These are private/secret values, do not share outside hosting environment
# Use `bin/rails db:encryption:init` to generate fresh secrets
# Do NOT change these secrets once in use, as this would cause data loss and other issues
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY= {{applications.mastodon.credentials.active_record_encryption_deterministic_key}}
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT= {{applications.mastodon.credentials.active_record_encryption_key_derivation_salt}}
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY= {{applications.mastodon.credentials.active_record_encryption_primary_key}}
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY= {{ applications | get_app_conf(application_id, 'credentials.active_record_encryption_deterministic_key') }}
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT= {{ applications | get_app_conf(application_id, 'credentials.active_record_encryption_key_derivation_salt') }}
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY= {{ applications | get_app_conf(application_id, 'credentials.active_record_encryption_primary_key') }}
DB_HOST={{ database_host }}
DB_PORT={{ database_port }}