Finished final raw draft of central database implementation. UNTESTED.

This commit is contained in:
2024-01-03 11:38:09 +01:00
parent 884b9370bb
commit 509914fb86
29 changed files with 159 additions and 176 deletions

View File

@@ -1,3 +1,4 @@
# This template needs to be included in docker-compose.yml
networks:
{% if enable_central_database %}
central_{{ database_type }}_network:

View File

@@ -0,0 +1,5 @@
# This needs to be included in docker-compose.yml which just contain a database volume
{% if not enable_central_database %}
volumes:
database:
{% endif %}

View File

@@ -1,3 +1,4 @@
# This template needs to be included in docker-compose.yml which contain a database and additional volumes
volumes:
{% if not enable_central_database %}
database:

View File

@@ -0,0 +1,6 @@
# This template needs to be included in docker-compose.yml containers which depend on a database and additional containers
depends_on:
{% if enable_central_database %}
database:
condition: service_healthy
{% endif %}

View File

@@ -0,0 +1,8 @@
# This template needs to be included in docker-compose.yml contaienrs, which depend on a database, redis and optional additional volumes
depends_on:
{% if enable_central_database %}
database:
condition: service_healthy
{% endif %}
redis:
condition: service_healthy

View File

@@ -1,3 +1,4 @@
# This template needs to be included in docker-compose.yml contaienrs, which just depend on a database
{% if enable_central_database %}
depends_on:
database:

View File

@@ -1,3 +1,4 @@
# This template needs to be included in docker-compose.yml containers
networks:
- {{docker_compose_project_name}}_network
{% if enable_central_database %}

View File

@@ -1,3 +1,4 @@
# This template needs to be included in docker-compose.yml, which depend on a mariadb database
{% if not enable_central_database %}
database:
logging:

View File

@@ -1,3 +1,4 @@
# This template needs to be included in docker-compose.yml, which depend on a postgres database
{% if not enable_central_database %}
database:
image: postgres:{{database_version}}-alpine

View File

@@ -1,3 +1,4 @@
# This template needs to be included in docker-compose.yml, which depend on redis
redis:
image: redis:alpine
restart: always