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,12 +1,15 @@
|
||||
---
|
||||
- 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 tasks nginx-docker-proxy-domain.yml"
|
||||
include_tasks: nginx-docker-proxy-domain.yml
|
||||
|
||||
- name: create database in central Postgres
|
||||
include_role:
|
||||
name: docker-postgres
|
||||
when: enable_central_database | bool
|
||||
|
||||
- name: "include tasks update-repository-with-docker-compose.yml"
|
||||
include_tasks: update-repository-with-docker-compose.yml
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -3,8 +3,7 @@ repository_directory: "{{ path_docker_compose_instances }}{{docker
|
||||
docker_compose_instance_directory: "{{repository_directory}}compose/"
|
||||
docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml"
|
||||
database_host: "database"
|
||||
database_databasename: "{{docker_compose_project_name}}"
|
||||
database_username: "postgres"
|
||||
database_password: "{{openproject_database_password}}"
|
||||
repository_address: "https://github.com/opf/openproject-deploy"
|
||||
repository_address: "https://github.com/opf/openproject-deploy"
|
||||
database_version: "{{ openproject_database_version | default(postgres_default_version) }}"
|
||||
database_type: "postgres"
|
Reference in New Issue
Block a user