mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Added draft for central postgres and mariadb. variables and networks still need to be adapted
This commit is contained in:
@@ -4,7 +4,12 @@
|
||||
loop: "{{ domains }}"
|
||||
loop_control:
|
||||
loop_var: domain
|
||||
|
||||
|
||||
- name: create database in central Postgres
|
||||
include_role:
|
||||
name: docker-postgres
|
||||
when: enable_central_database | bool
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
|
@@ -12,22 +12,14 @@ services:
|
||||
- assets:/app/client/dist
|
||||
- data:/data
|
||||
- config:/config
|
||||
restart: "always"
|
||||
depends_on:
|
||||
- database
|
||||
- redis
|
||||
restart: "always"
|
||||
database:
|
||||
image: postgres:13-alpine
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- database:/var/lib/postgresql/data
|
||||
restart: "always"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U peertube"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 6
|
||||
{% if not ( enable_central_database | lower | bool ) %}
|
||||
- database
|
||||
|
||||
{% include 'templates/docker-postgres-service.yml.j2' %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||
|
||||
@@ -35,7 +27,9 @@ services:
|
||||
- .env
|
||||
volumes:
|
||||
assets:
|
||||
{% if not ( enable_central_database | lower | bool ) %}
|
||||
database:
|
||||
{% endif %}
|
||||
data:
|
||||
redis:
|
||||
config:
|
Reference in New Issue
Block a user