Added draft for central postgres and mariadb. variables and networks still need to be adapted

This commit is contained in:
2023-12-31 11:14:18 +01:00
parent 3fa052f71d
commit a112b67eda
48 changed files with 340 additions and 213 deletions

View File

@@ -28,6 +28,11 @@
state: directory
mode: 0755
- name: create database in central MariaDB
include_role:
name: docker-mariadb
when: enable_central_database | bool
- name: add docker-compose.yml
template:
src: "docker-compose.yml.j2"

View File

@@ -3,15 +3,11 @@ version: '2.2'
services:
{% include 'templates/docker-redis-service.yml.j2' %}
env_file: mailu.env
depends_on:
- resolver
dns:
- 192.168.203.254
{% include 'templates/docker-mariadb-service.yml.j2' %}
depends_on:
- resolver
dns:
@@ -53,8 +49,10 @@ services:
depends_on:
resolver:
condition: service_started
{% if not ( enable_central_database | lower | bool ) %}
database:
condition: service_healthy
{% endif %}
networks:
- default
- webmail
@@ -73,7 +71,9 @@ services:
- resolver
- front
- redis
{% if not ( enable_central_database | lower | bool ) %}
- database
{% endif %}
logging:
driver: journald
dns:
@@ -202,9 +202,14 @@ services:
- webmail
dns:
- 192.168.203.254
{% if not ( enable_central_database | lower | bool ) %}
{% include 'templates/docker-postgres-service.yml.j2' %}
{% endif %}
volumes:
{% if not ( enable_central_database | lower | bool ) %}
database:
{% endif %}
smtp_queue:
admin_data:
webdav_data: