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

@@ -2,6 +2,11 @@
- name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml
- name: Create database in central MariaDB
include_role:
name: docker-mariadb
when: enable_central_database | bool
- name: "create {{docker_compose_instance_directory}}"
file:
path: "{{docker_compose_instance_directory}}"

View File

@@ -1,14 +1,6 @@
version: "3"
services:
postgres:
restart: always
env_file: .env
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
image: postgres:15-alpine
volumes:
- database:/var/lib/postgresql/data
{% include 'templates/docker-redis-service.yml.j2' %}
@@ -18,7 +10,9 @@ services:
restart: always
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
depends_on:
{% if not ( enable_central_database | lower | bool ) %}
- postgres
% endif %}
- redis
env_file: .env
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY-0}
@@ -31,7 +25,9 @@ services:
restart: always
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
depends_on:
{% if not ( enable_central_database | lower | bool ) %}
- postgres
% endif %}
- redis
env_file: .env
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
@@ -65,7 +61,15 @@ services:
ports:
# override those variables in your .env file if needed
- "${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT}:80"
{% if not ( enable_central_database | lower | bool ) %}
{% include 'templates/docker-postgres-service.yml.j2' %}
{% endif %}
volumes:
data:
redis:
database:
{% if not ( enable_central_database | lower | bool ) %}
database:
{% endif %}

View File

@@ -1,3 +1,7 @@
docker_compose_project_name: "funkwhale"
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
database_databasename: "{{docker_compose_project_name}}"
database_username: "{{docker_compose_project_name}}"
database_password: "{{funkwhale_database_password}}"
database_version: "{{ funkwhale_database_version | default(postgres_default_version) }}"