mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Implemented vars, tasks and templates for central database setup until mastodon role
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
---
|
||||
- name: include docker vars
|
||||
include_vars: vars/docker-database-service.yml.j2
|
||||
|
||||
- name: create central database
|
||||
include_role:
|
||||
name: docker-{{database_type}}
|
||||
when: enable_central_database | bool
|
||||
|
||||
- name: "include tasks create-proxy-with-domain-replace.yml"
|
||||
include_tasks: create-proxy-with-domain-replace.yml
|
||||
loop: "{{ domains + [source_domain] }}"
|
||||
loop_control:
|
||||
loop_var: domain
|
||||
|
||||
- name: create database in central MariaDB
|
||||
include_role:
|
||||
name: docker-mariadb
|
||||
when: enable_central_database | bool
|
||||
|
||||
- name: "create {{docker_compose_instance_confd_directory}} and parent directories"
|
||||
file:
|
||||
path: "{{docker_compose_instance_confd_directory}}"
|
||||
|
@@ -26,15 +26,8 @@ services:
|
||||
- "{{docker_compose_instance_confd_directory}}:{{target_mount_conf_d_directory}}:ro"
|
||||
- "data:/var/www/html:ro"
|
||||
|
||||
{% if not enable_central_database %}
|
||||
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||
{% endif %}
|
||||
{% include 'templates/docker-{{ database_type }}-service.yml.j2' %}
|
||||
|
||||
volumes:
|
||||
{% if not enable_central_database %}
|
||||
database:
|
||||
{% endif %}
|
||||
data:
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
||||
{% include 'templates/docker-database-volume.yml.j2' %}
|
||||
data:
|
@@ -1,11 +1,8 @@
|
||||
---
|
||||
docker_compose_project_name: "mybb"
|
||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||
docker_compose_instance_confd_directory: "{{docker_compose_instance_directory}}conf.d/"
|
||||
docker_compose_instance_confd_defaultconf_file: "{{docker_compose_instance_confd_directory}}default.conf"
|
||||
target_mount_conf_d_directory: "{{nginx_servers_directory}}"
|
||||
source_domain: "mybb.{{top_domain}}"
|
||||
database_host: "database"
|
||||
database_databasename: "{{docker_compose_project_name}}"
|
||||
database_username: "{{docker_compose_project_name}}"
|
||||
database_password: "{{mybb_database_password}}"
|
||||
database_password: "{{mybb_database_password}}"
|
||||
database_type: "mariadb"
|
Reference in New Issue
Block a user