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,4 +1,12 @@
|
||||
---
|
||||
- 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 task certbot-matomo.yml"
|
||||
include_tasks: certbot-matomo.yml
|
||||
|
||||
@@ -20,11 +28,6 @@
|
||||
dest: "{{path_docker_volumes}}nextcloud/nginx.conf"
|
||||
notify: docker compose project setup
|
||||
|
||||
- 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}}"
|
||||
|
@@ -17,7 +17,7 @@ services:
|
||||
depends_on:
|
||||
- database
|
||||
|
||||
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||
{% include 'templates/docker-{{ database_type }}-service.yml.j2' %}
|
||||
{% endif %}
|
||||
|
||||
web:
|
||||
@@ -44,17 +44,9 @@ services:
|
||||
volumes:
|
||||
- data:/var/www/html
|
||||
entrypoint: /cron.sh
|
||||
depends_on:
|
||||
{% if not enable_central_database %}
|
||||
- database
|
||||
{% endif %}
|
||||
- redis
|
||||
{% include 'templates/docker-depends-on-central-database.yml.j2' %}
|
||||
redis:
|
||||
volumes:
|
||||
{% if not enable_central_database %}
|
||||
database:
|
||||
{% endif %}
|
||||
{% include 'templates/docker-database-volume.yml.j2' %}
|
||||
data:
|
||||
redis:
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
||||
|
@@ -1,7 +1,4 @@
|
||||
---
|
||||
docker_compose_project_name: "nextcloud"
|
||||
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: "{{nextcloud_database_password}}"
|
||||
database_password: "{{nextcloud_database_password}}"
|
||||
database_type: "mariadb"
|
Reference in New Issue
Block a user