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 MariaDB
|
||||
include_role:
|
||||
name: docker-mariadb
|
||||
when: enable_central_database | bool
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
|
@@ -10,9 +10,7 @@ services:
|
||||
restart: always
|
||||
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||
depends_on:
|
||||
{% if not enable_central_database %}
|
||||
- postgres
|
||||
% endif %}
|
||||
{% include 'templates/docker-depends-on-central-database.yml.j2' %}
|
||||
- redis
|
||||
env_file: .env
|
||||
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY-0}
|
||||
@@ -20,23 +18,24 @@ services:
|
||||
- C_FORCE_ROOT=true
|
||||
volumes:
|
||||
- "data:${MEDIA_ROOT}"
|
||||
{% include 'templates/docker-networks-for-container.yml.j2' %}
|
||||
|
||||
|
||||
celerybeat:
|
||||
restart: always
|
||||
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||
depends_on:
|
||||
{% if not enable_central_database %}
|
||||
- postgres
|
||||
% endif %}
|
||||
{% include 'templates/docker-depends-on-central-database.yml.j2' %}
|
||||
- redis
|
||||
env_file: .env
|
||||
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
||||
{% include 'templates/docker-networks-for-container.yml.j2' %}
|
||||
|
||||
api:
|
||||
restart: always
|
||||
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||
depends_on:
|
||||
- postgres
|
||||
{% include 'templates/docker-depends-on-central-database.yml.j2' %}
|
||||
- redis
|
||||
env_file: .env
|
||||
volumes:
|
||||
@@ -44,6 +43,7 @@ services:
|
||||
#- "${STATIC_ROOT}:${STATIC_ROOT}"
|
||||
ports:
|
||||
- "5000"
|
||||
{% include 'templates/docker-networks-for-container.yml.j2' %}
|
||||
|
||||
front:
|
||||
restart: always
|
||||
@@ -61,15 +61,13 @@ services:
|
||||
ports:
|
||||
# override those variables in your .env file if needed
|
||||
- "${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT}:80"
|
||||
{% include 'templates/docker-networks-for-container.yml.j2' %}
|
||||
|
||||
{% if not enable_central_database %}
|
||||
{% include 'templates/docker-postgres-service.yml.j2' %}
|
||||
{% endif %}
|
||||
{% include 'templates/docker-{{ database_type }}-service.yml.j2' %}
|
||||
|
||||
volumes:
|
||||
data:
|
||||
redis:
|
||||
{% include 'templates/docker-database-volume.yml.j2' %}
|
||||
|
||||
{% if not enable_central_database %}
|
||||
database:
|
||||
{% endif %}
|
||||
{% include 'templates/docker-networks-for-role.yml.j2' %}
|
@@ -1,7 +1,5 @@
|
||||
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) }}"
|
||||
database_type: "postgres"
|
Reference in New Issue
Block a user