mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
The compose flavor retried the one-shot installer up to eight times without touching what a failed attempt left behind. Once an attempt had half-installed Matomo, every retry met the existing-tables dialog, erased the tables and landed on the CoreUpdater screen, which the bootstrap image cannot drive: 41 minutes of retries against an application that had in fact been installed since attempt 2. Move the swarm flavor's pre-retry cleanup into tasks/utils/reset_state.yml and drive it from both flavors, so every retry starts from a clean slate and takes the clean-install path instead of the erase-and-wedge one. The reset re-probes the live container before it touches anything. The caller's gate is a snapshot taken before the attempt loop and reads an unreachable container as "not installed", which would otherwise put a DROP DATABASE within reach of a live installation; a probe that cannot run now fails the play. Collapse MATOMO_BOOTSTRAP_RETRIES and MATOMO_BOOTSTRAP_SWARM_ATTEMPTS into a single MATOMO_BOOTSTRAP_ATTEMPTS, and surface the failed attempt's stderr in the final failure message, which the attempt loop would otherwise swallow. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
33 lines
1.7 KiB
YAML
33 lines
1.7 KiB
YAML
---
|
|
application_id: "web-app-matomo"
|
|
domain: "{{ lookup('domain',application_id) }}"
|
|
http_port: "{{ lookup('config', application_id, 'services.matomo.ports.local.http') }}"
|
|
entity_name: "{{ application_id | get_entity_name }}"
|
|
|
|
MATOMO_SERVICE: "{{ entity_name }}"
|
|
MATOMO_NAME: "{{ lookup('config', application_id, 'services.' ~ MATOMO_SERVICE ~ '.name') }}"
|
|
MATOMO_CONFIG: "/var/www/html/config/config.ini.php"
|
|
MATOMO_SERVICE_URL: "http://{{ MATOMO_SERVICE }}"
|
|
|
|
MATOMO_BOOTSTRAP_SERVICE: "bootstrap"
|
|
MATOMO_BOOTSTRAP_PROFILE: "{{ MATOMO_BOOTSTRAP_SERVICE }}"
|
|
MATOMO_BOOTSTRAP_NAME: "{{ lookup('config', application_id, 'services.' ~ MATOMO_BOOTSTRAP_SERVICE ~ '.name') }}"
|
|
MATOMO_BOOTSTRAP_TIMEOUT: "{{ lookup('config', application_id, 'services.' ~ MATOMO_BOOTSTRAP_SERVICE ~ '.timeout') }}"
|
|
MATOMO_BOOTSTRAP_ENV_FILE: "{{ [lookup('container', application_id, 'directories.env'), MATOMO_BOOTSTRAP_SERVICE ~ '.env'] | path_join }}"
|
|
MATOMO_BOOTSTRAP_ATTEMPTS: 3
|
|
|
|
MATOMO_INSTALLER_STEP_DEADLINE_S: 420
|
|
MATOMO_BOOTSTRAP_SWARM_POLL_DELAY_S: 15
|
|
|
|
MATOMO_ADMIN_USER_KEY: "administrator"
|
|
MATOMO_ADMIN_USER_NAME: "{{ lookup('users', MATOMO_ADMIN_USER_KEY).username }}"
|
|
MATOMO_ADMIN_PASSWORD: "{{ lookup('users', MATOMO_ADMIN_USER_KEY).password }}"
|
|
MATOMO_ADMIN_EMAIL: "{{ lookup('users', MATOMO_ADMIN_USER_KEY).email }}"
|
|
MATOMO_SITE_NAME: "{{ lookup('config', application_id, 'services.matomo.site_name') }}"
|
|
MATOMO_SITE_URL: "{{ lookup('tls', application_id, 'url.base') }}"
|
|
MATOMO_EXCLUDED_IPS: "{{ lookup('config', application_id, 'services.matomo.excluded_ips') }}"
|
|
|
|
MATOMO_TOKEN_DESCRIPTION: "{{ lookup('config', application_id, 'services.matomo.token.description') }}"
|
|
|
|
matomo_index_php_url: "http://{{ DOCKER_REACH_HOST }}:{{ http_port }}/index.php"
|