Implemented vars, tasks and templates for central database setup until mastodon role

This commit is contained in:
2024-01-02 21:13:34 +01:00
parent 4e09fbd3fb
commit ab7ca07ac9
76 changed files with 431 additions and 467 deletions

View File

@@ -5,9 +5,7 @@ networks:
backend:
volumes:
{% if not enable_central_database %}
database:
{% endif %}
{% include 'templates/docker-database-volume.yml.j2' %}
data:
x-op-restart-policy: &restart_policy
@@ -36,9 +34,7 @@ x-op-app: &app
services:
{% if not enable_central_database %}
{% include 'templates/docker-postgres-service.yml.j2' %}
{% endif %}
{% include 'templates/docker-{{ database_type }}-service.yml.j2' %}
networks:
- backend
@@ -72,12 +68,9 @@ services:
networks:
- frontend
- backend
depends_on:
{% if not enable_central_database %}
- database
{% endif %}
- cache
- seeder
{% include 'templates/docker-depends-on-central-database.yml.j2' %}
cache:
seeder:
labels:
- autoheal=true
healthcheck:
@@ -101,24 +94,18 @@ services:
command: "./docker/prod/worker"
networks:
- backend
depends_on:
{% if not enable_central_database %}
- database
{% endif %}
- cache
- seeder
{% include 'templates/docker-depends-on-central-database.yml.j2' %}
cache:
seeder:
cron:
<<: *app
command: "./docker/prod/cron"
networks:
- backend
depends_on:
{% if not enable_central_database %}
- database
{% endif %}
- cache
- seeder
{% include 'templates/docker-depends-on-central-database.yml.j2' %}
cache:
seeder:
seeder:
<<: *app