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 nginx-docker-proxy-domain.yml"
|
||||
include_tasks: nginx-docker-proxy-domain.yml
|
||||
loop: "{{ domains }}"
|
||||
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_directory}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
|
@@ -11,21 +11,20 @@ services:
|
||||
JOOMLA_DB_PASSWORD: "{{database_password}}"
|
||||
JOOMLA_DB_NAME: "{{database_databasename}}"
|
||||
restart: always
|
||||
{% if not enable_central_database %}
|
||||
depends_on:
|
||||
- database
|
||||
{% endif %}
|
||||
{% include 'templates/docker-depends-on-central-database.yml.j2' %}
|
||||
volumes:
|
||||
- data:/var/www/html
|
||||
ports:
|
||||
- "127.0.0.1:{{http_port}}:80"
|
||||
{% include 'templates/docker-networks-for-container.yml.j2' %}
|
||||
{% if enable_central_database %}
|
||||
depends_on:
|
||||
database:
|
||||
|
||||
{% if not enable_central_database %}
|
||||
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||
{% endif %}
|
||||
{% include 'templates/docker-{{ database_type }}-service.yml.j2' %}
|
||||
|
||||
volumes:
|
||||
data:
|
||||
{% if not enable_central_database %}
|
||||
database:
|
||||
{% endif %}
|
||||
{% include 'templates/docker-database-volume.yml.j2' %}
|
||||
|
||||
{% include 'templates/docker-networks-for-role.yml.j2' %}
|
||||
|
@@ -1,6 +1,3 @@
|
||||
docker_compose_project_name: "joomla"
|
||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||
database_host: "database"
|
||||
database_databasename: "{{docker_compose_project_name}}"
|
||||
database_username: "{{docker_compose_project_name}}"
|
||||
database_password: "{{joomla_database_password}}"
|
||||
database_password: "{{joomla_database_password}}"
|
||||
database_type: "postgres"
|
Reference in New Issue
Block a user