mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
80 lines
3.5 KiB
Django/Jinja
80 lines
3.5 KiB
Django/Jinja
{% include 'roles/sys-svc-compose/templates/base.yml.j2' %}
|
|
{% set service_name = 'celeryworker' %}
|
|
{{ service_name }}:
|
|
{% include 'roles/sys-svc-container/templates/base.yml.j2' %}
|
|
{{ lookup('container_image', application_id, 'api') }}
|
|
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency={{FUNKWHALE_CELERYD_CONCURRENCY}}
|
|
environment:
|
|
- C_FORCE_ROOT=true
|
|
{{ lookup('container_volumes', service_name) | indent(4) }}
|
|
{{ lookup('container_depends_on', application_id, extra={
|
|
'migrate': {'condition': 'service_completed_successfully'},
|
|
}) | indent(4) }}
|
|
{{ lookup('container_extra_hosts') | indent(4) }}
|
|
{{ lookup('container_networks') | indent(4) }}
|
|
|
|
{% set service_name = 'celerybeat' %}
|
|
{{ service_name }}:
|
|
{% include 'roles/sys-svc-container/templates/base.yml.j2' %}
|
|
{{ lookup('container_image', application_id, 'api') }}
|
|
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
|
{{ lookup('container_volumes', service_name) | indent(4) }}
|
|
{{ lookup('container_depends_on', application_id, extra={
|
|
'migrate': {'condition': 'service_completed_successfully'},
|
|
}) | indent(4) }}
|
|
{{ lookup('container_extra_hosts') | indent(4) }}
|
|
{{ lookup('container_networks') | indent(4) }}
|
|
|
|
{% set service_name = 'api' %}
|
|
{{ service_name }}:
|
|
{{ lookup('container_healthcheck', service_name) | indent(4) }}
|
|
{% include 'roles/sys-svc-container/templates/base.yml.j2' %}
|
|
{{ lookup('container_image', application_id, 'api') }}
|
|
command: gunicorn
|
|
{{ lookup('container_volumes', service_name) | indent(4) }}
|
|
{{ lookup('container_ports',
|
|
{'service': 'api', 'protocol': 'http',
|
|
'publish': 'ephemeral'}) | indent(4) }}
|
|
{{ lookup('container_depends_on', application_id, extra={
|
|
'migrate': {'condition': 'service_completed_successfully'},
|
|
}) | indent(4) }}
|
|
{{ lookup('container_extra_hosts') | indent(4) }}
|
|
{{ lookup('container_networks') | indent(4) }}
|
|
|
|
{% set service_name = 'front' %}
|
|
{{ service_name }}:
|
|
{% include 'roles/sys-svc-container/templates/base.yml.j2' %}
|
|
{{ lookup('container_image', application_id, 'funkwhale') }}
|
|
{{ lookup('container_healthcheck', 'funkwhale') | indent(4) }}
|
|
{{ lookup('depends_on', ['api']) }}
|
|
environment:
|
|
- "NGINX_MAX_BODY_SIZE=100M"
|
|
{{ lookup('container_volumes', service_name) | indent(4) }}
|
|
{{ lookup('container_ports', ['funkwhale', 'http', DOCKER_BIND_HOST]) | indent(4) }}
|
|
{{ lookup('container_extra_hosts') | indent(4) }}
|
|
{{ lookup('container_networks') | indent(4) }}
|
|
|
|
{% set service_name = 'typesense' %}
|
|
{{ service_name }}:
|
|
{% include 'roles/sys-svc-container/templates/base.yml.j2' %}
|
|
{{ lookup('container_image', application_id, 'typesense') }}
|
|
{{ lookup('container_volumes', service_name) | indent(4) }}
|
|
command: --data-dir /data --enable-cors --api-key {{ FUNKWHALE_TYPESENSE_API_KEY }}
|
|
{% if DEPLOYMENT_MODE == 'compose' %}
|
|
profiles:
|
|
- typesense
|
|
{% endif %}
|
|
|
|
{% set service_name = 'migrate' %}
|
|
{% set docker_restart_policy = 'on-failure' %}
|
|
{{ service_name }}:
|
|
{% include 'roles/sys-svc-container/templates/base.yml.j2' %}
|
|
{{ lookup('container_image', application_id, 'api') }}
|
|
command: migrate
|
|
{{ lookup('container_depends_on', application_id) | indent(4) }}
|
|
{{ lookup('container_extra_hosts') | indent(4) }}
|
|
{{ lookup('container_networks') | indent(4) }}
|
|
|
|
{{ lookup('compose_volumes') }}
|
|
{{ lookup('compose_networks') }}
|