ansible/roles/music/templates/docker-compose.yml.j2

109 lines
3.1 KiB
Plaintext
Raw Normal View History

2021-04-27 03:16:49 +02:00
version: "{{ compose_version }}"
networks:
proxy:
name: "{{ traefik_network }}"
db:
name: funkwhale_db
volumes:
redis:
name: funkwhale_redis
db:
name: funkwhale_db
static:
name: funkwhale_static
services:
celeryworker:
2023-06-11 22:43:57 +02:00
image: "funkwhale/api:{{ funkwhale_version }}"
2021-04-27 03:16:49 +02:00
container_name: funkwhale_celeryworker
env_file:
- ./conf.env
environment:
- C_FORCE_ROOT=true
volumes:
- "{{ funkwhale_import_music_directory_host }}:{{ funkwhale_import_music_directory }}:ro"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
2023-06-11 22:43:57 +02:00
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=10
2021-04-27 03:16:49 +02:00
networks:
- db
restart: unless-stopped
celerybeat:
2023-06-11 22:43:57 +02:00
image: "funkwhale/api:{{ funkwhale_version }}"
2021-04-27 03:16:49 +02:00
container_name: funkwhale_celerybeat
env_file: ./conf.env
2023-06-11 22:43:57 +02:00
command: celery -A funkwhale_api.taskapp beat -l INFO
2021-04-27 03:16:49 +02:00
networks:
- db
restart: unless-stopped
api:
2023-06-11 22:43:57 +02:00
image: "funkwhale/api:{{ funkwhale_version }}"
2021-04-27 03:16:49 +02:00
container_name: funkwhale_api
env_file:
- ./conf.env
volumes:
- "{{ funkwhale_import_music_directory_host }}:{{ funkwhale_import_music_directory }}:ro"
- "static:{{ funkwhale_static_root }}"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
2021-04-27 03:16:49 +02:00
labels:
traefik.http.routers.funkwhale_api.entrypoints: websecure
traefik.http.routers.funkwhale_api.rule: "Host(`api.{{ funkwhale_subdomain }}.{{ domain_name }}`)"
traefik.http.services.funkwhale_api.loadbalancer.server.port: "{{ funkwhale_api_port }}"
traefik.enable: true
networks:
- proxy
- db
restart: unless-stopped
2023-06-11 22:43:57 +02:00
front:
image: funkwhale/front:{{ funkwhale_version }}
container_name: funkwhale_front
2021-04-27 03:16:49 +02:00
env_file: ./conf.env
volumes:
- "{{ funkwhale_import_music_directory_host }}:{{ funkwhale_import_music_directory }}:ro"
2023-06-11 22:43:57 +02:00
- "static:/usr/share/nginx/html/staticfiles:ro"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
2021-04-27 03:16:49 +02:00
labels:
traefik.http.routers.funkwhale.entrypoints: websecure
traefik.http.routers.funkwhale.rule: "Host(`{{ funkwhale_subdomain }}.{{ domain_name }}`)"
traefik.http.services.funkwhale.loadbalancer.server.port: "{{ funkwhale_nginx_port }}"
traefik.enable: true
networks:
- proxy
restart: unless-stopped
redis:
image: "redis:{{ redis_version }}"
container_name: funkwhale_redis
env_file: ./conf.env
volumes:
- redis:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
2021-04-27 03:16:49 +02:00
networks:
- db
restart: unless-stopped
db:
image: "postgres:{{ postgres_version }}"
container_name: funkwhale_postgres
environment:
POSTGRES_USER: funkwhale
POSTGRES_DB: funkwhale
POSTGRES_PASSWORD: "{{ funkwhale_db_password }}"
TZ: Europe/Paris
PGTZ: Europe/Paris
# Don't mount /etc/localtime, it screws with pg_timezone_names
# TZ and PGTZ environment are sufficient.
2021-04-27 03:16:49 +02:00
volumes:
- db:/var/lib/postgresql/data
networks:
- db
restart: unless-stopped