73 lines
2.9 KiB
Django/Jinja

services:
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/redis.yml.j2' %}
celeryworker:
# Celery workers handle background tasks (such file imports or federation
# messaging). The more processes a worker gets, the more tasks
# can be processed in parallel. However, more processes also means
# a bigger memory footprint.
# By default, a worker will span a number of process equal to your number
# of CPUs. You can adjust this, by explicitly setting the --concurrency
# flag:
# celery -A funkwhale_api.taskapp worker -l INFO --concurrency=4
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
image: "{{ applications | get_docker_image(application_id,'api') }}"
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency={{celeryd_concurrency}}
environment:
- C_FORCE_ROOT=true
volumes:
- "data:{{funkwhale_media_root}}"
- "music:{{funkwhale_music_directory_path}}:ro"
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
celerybeat:
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
image: "{{ applications | get_docker_image(application_id,'api') }}"
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
api:
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
image: "{{ applications | get_docker_image(application_id,'api') }}"
volumes:
- "music:{{funkwhale_music_directory_path}}:ro"
- "data:{{funkwhale_media_root}}"
- "funkwhale_static_root:{{funkwhale_static_root}}"
ports:
- "{{ funkwhale_docker_api_port }}"
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
front:
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
image: "{{ applications | get_docker_image(application_id,'front') }}"
depends_on:
- api
environment:
- "NGINX_MAX_BODY_SIZE=100M"
volumes:
- "data:{{funkwhale_media_root}}:ro"
#- "{{funkwhale_static_root}}:{{funkwhale_static_root}}:ro"
ports:
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
typesense:
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
image: "{{ applications[application_id].docker.images.typesense }}"
volumes:
- ./typesense/data:/data
command: --data-dir /data --enable-cors
profiles:
- typesense
{% include 'templates/docker/compose/volumes.yml.j2' %}
data:
funkwhale_static_root:
redis:
music:
{% include 'templates/docker/compose/networks.yml.j2' %}