mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 23:38:13 +02:00
refactor(web-app-mybb): remove obsolete Installation.md, introduce schema for secret_pin, and rework task/vars handling
- Removed outdated Installation.md (manual plugin instructions no longer needed) - Added schema/main.yml with validation for secret_pin - Added config.php.j2 template to manage DB + admin config - Refactored tasks/main.yml to deploy config.php instead of legacy docker-compose - Removed setup-domain.yml (TLS/domain handling moved to core roles) - Updated docker-compose.yml.j2 to mount config.php and use new vars - Cleaned up vars/main.yml: standardized MYBB_* variable names, added MYBB_SECRET_PIN, config paths, and container port See ChatGPT conversation: https://chatgpt.com/share/68b0ae26-93ec-800f-8785-0da7c9303090
This commit is contained in:
13
roles/web-app-mybb/templates/config.php.j2
Normal file
13
roles/web-app-mybb/templates/config.php.j2
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
$config = array();
|
||||
$config['database']['type'] = 'mysqli';
|
||||
$config['database']['database'] = '{{ database_name }}';
|
||||
$config['database']['table_prefix'] = 'mybb_';
|
||||
$config['database']['hostname'] = '{{ database_host }}';
|
||||
$config['database']['port'] = '{{ database_port }}';
|
||||
$config['database']['username'] = '{{ database_username }}';
|
||||
$config['database']['password'] = '{{ database_password }}';
|
||||
$config['database']['encoding'] = 'utf8mb4';
|
||||
$config['super_admins'] = '{{ MYBB_ADMIN_USER_ID }}';
|
||||
$config['secret_pin'] = '{{ MYBB_SECRET_PIN }}';
|
||||
$config['admin_dir'] = 'admin';
|
@@ -1,11 +1,8 @@
|
||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||
application:
|
||||
logging:
|
||||
driver: journald
|
||||
options:
|
||||
tag: "mybb_application"
|
||||
image: {{ mybb_image }}:{{ mybb_version }}
|
||||
container_name: {{ mybb_name }}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
image: {{ MYBB_IMAGE }}:{{ MYBB_VERSION }}
|
||||
container_name: {{ MYBB_CONTAINER }}
|
||||
restart: {{ DOCKER_RESTART_POLICY }}
|
||||
volumes:
|
||||
- data:/var/www/html
|
||||
@@ -13,21 +10,20 @@
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
server:
|
||||
logging:
|
||||
driver: journald
|
||||
options:
|
||||
tag: "mybb_server"
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
image: nginx:mainline
|
||||
restart: {{ DOCKER_RESTART_POLICY }}
|
||||
ports:
|
||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
|
||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"
|
||||
volumes:
|
||||
- "{{docker_compose_instance_confd_directory}}:{{target_mount_conf_d_directory}}:ro"
|
||||
- "{{ MYBB_NGINX_CONF_DIR_HOST }}:{{ MYBB_NGINX_CONF_DIR_DOCK }}:ro"
|
||||
- "{{ MYBB_CONFIG_HOST_PATH }}:{{ MYBB_CONFIG_DOCK_PATH }}:ro"
|
||||
- "data:/var/www/html:ro"
|
||||
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||
data:
|
||||
name: {{ mybb_volume }}
|
||||
name: {{ MYBB_VOLUME }}
|
||||
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
Reference in New Issue
Block a user