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

@@ -11,5 +11,10 @@
dest: "{{nginx_servers_directory}}{{domain}}.conf"
notify: restart nginx
- name: Create database in central MariaDB
include_role:
name: docker-mariadb
when: enable_central_database | bool
- name: "include tasks update-repository-with-docker-compose.yml"
include_tasks: update-repository-with-docker-compose.yml

View File

@@ -9,7 +9,9 @@ services:
- .:/usr/share/nginx/html
- .:/var/www
depends_on:
{% if not ( enable_central_database | lower | bool ) %}
- database
{% endif %}
- maildev
- redis
- worker
@@ -18,15 +20,15 @@ services:
worker:
image: attendize_worker:latest
depends_on:
{% if not ( enable_central_database | lower | bool ) %}
- database
{% endif %}
- maildev
- redis
volumes:
- .:/usr/share/nginx/html
- .:/var/www
{% include 'templates/docker-mariadb-service.yml.j2' %}
maildev:
image: maildev/maildev
ports:
@@ -34,6 +36,15 @@ services:
{% include 'templates/docker-redis-service.yml.j2' %}
{% if not ( enable_central_database | lower | bool ) %}
depends_on:
- database
{% include 'templates/docker-mariadb-service.yml.j2' %}
{% endif %}
volumes:
redis:
{% if not ( enable_central_database | lower | bool ) %}
database:
redis:
{% endif %}