Fix Mastodon role: run DB migrations before health checks, restructure setup/wait tasks, introduce service name variables, and update docker-compose templates.

Reference: https://chatgpt.com/share/6925e87d-3e0c-800f-bfff-902d1faa122e
This commit is contained in:
2025-11-25 18:34:11 +01:00
parent a312f353fb
commit dfa5e26582
7 changed files with 31 additions and 19 deletions

View File

@@ -0,0 +1,4 @@
- name: "Execute migration for '{{ application_id }}'"
command:
chdir: "{{ docker_compose.directories.instance }}"
cmd: "docker compose run --rm {{ MASTODON_SERVICE_NAME }} bundle exec rails db:migrate"