mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 23:08:06 +02:00
Config & features: - roles/web-app-mediawiki/config/main.yml: - Add sitename ('Wiki on {{ PRIMARY_DOMAIN | upper }}') and meta_namespace ('Meta') - Enable central_database feature and database service - Move volumes under docker.volumes (correct indentation) Tasks & automation: - roles/web-app-mediawiki/tasks/main.yml: - Avoid immediate compose handler flush (docker_compose_flush_handlers: false), then explicit meta: flush_handlers - Deploy templated LocalSettings.php to host path - Create admin via maintenance/createAndPromote.php (docker exec, idempotent changed_when/failed_when) Templates: - roles/web-app-mediawiki/templates/LocalSettings.php.j2: - Set $wgSitename, $wgMetaNamespace, $wgServer from MEDIAWIKI_* - DB settings (mysql, host:port, name, user, password) - Mail settings (EmergencyContact/PasswordSender) - Default skin: vector - Load basic extensions (ParserFunctions, Cite) - roles/web-app-mediawiki/templates/docker-compose.yml.j2: - Switch to MEDIAWIKI_* vars, mount LocalSettings.php (ro) - Use container_port, include curl healthcheck - Fix volumes name to MEDIAWIKI_VOLUME Vars: - roles/web-app-mediawiki/vars/main.yml: - Restructure with MEDIAWIKI_* (sitename, meta_namespace, URL, image/version/container/volume) - Define SETTINGS host/dock paths, container_port, default user (www-data) - Admin bootstrap vars (name/password/email) Misc: - Add empty schema/main.yml placeholder for future validation Refs: ChatGPT conversation (2025-08-28, Europe/Berlin). Link: https://chatgpt.com/share/68b0ace6-f8f4-800f-b7a7-a51a6c5260f1
23 lines
1.3 KiB
YAML
23 lines
1.3 KiB
YAML
# General
|
|
application_id: "web-app-mediawiki"
|
|
database_type: "mariadb"
|
|
container_port: 80
|
|
|
|
# Mediawiki
|
|
MEDIAWIKI_SITENAME: "{{ applications | get_app_conf(application_id, 'sitename') }}"
|
|
MEDIAWIKI_META_NAMESPACE: "{{ applications | get_app_conf(application_id, 'meta_namespace') }}"
|
|
MEDIAWIKI_URL: "{{ domains | get_url(application_id, WEB_PROTOCOL) }}"
|
|
|
|
## Docker
|
|
MEDIAWIKI_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.mediawiki.version') }}"
|
|
MEDIAWIKI_IMAGE: "{{ applications | get_app_conf(application_id, 'docker.services.mediawiki.image') }}"
|
|
MEDIAWIKI_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.mediawiki.name') }}"
|
|
MEDIAWIKI_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.data') }}"
|
|
MEDIAWIKI_SETTINGS_HOST_PATH: "{{ [docker_compose.directories.volumes, 'LocalSettings.php'] | path_join }}"
|
|
MEDIAWIKI_SETTINGS_DOCK_PATH: "/var/www/html/LocalSettings.php"
|
|
MEDIAWIKI_USER: "www-data"
|
|
|
|
# User
|
|
MEDIAWIKI_ADMINISTRATOR_NAME: "{{ users.administrator.username }}"
|
|
MEDIAWIKI_ADMINISTRATOR_PASSWORD: "{{ users.administrator.password }}"
|
|
MEDIAWIKI_ADMINISTRATOR_EMAIL: "{{ users.administrator.email }}" |