115 lines
3.3 KiB
Django/Jinja
115 lines
3.3 KiB
Django/Jinja
version: "{{ compose_version }}"
|
|
|
|
networks:
|
|
proxy:
|
|
name: "{{ traefik_network }}"
|
|
db:
|
|
name: funkwhale_db
|
|
|
|
volumes:
|
|
redis:
|
|
name: funkwhale_redis
|
|
db:
|
|
name: funkwhale_db
|
|
frontend:
|
|
name: funkwhale_frontend
|
|
static:
|
|
name: funkwhale_static
|
|
|
|
services:
|
|
celeryworker:
|
|
image: "funkwhale/funkwhale:{{ funkwhale_version }}"
|
|
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
|
|
command: celery -A funkwhale_api.taskapp worker -l INFO
|
|
networks:
|
|
- db
|
|
restart: unless-stopped
|
|
|
|
celerybeat:
|
|
image: "funkwhale/funkwhale:{{ funkwhale_version }}"
|
|
container_name: funkwhale_celerybeat
|
|
env_file: ./conf.env
|
|
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
|
networks:
|
|
- db
|
|
restart: unless-stopped
|
|
|
|
api:
|
|
image: "funkwhale/funkwhale:{{ funkwhale_version }}"
|
|
container_name: funkwhale_api
|
|
env_file:
|
|
- ./conf.env
|
|
volumes:
|
|
- "{{ funkwhale_import_music_directory_host }}:{{ funkwhale_import_music_directory }}:ro"
|
|
- "static:{{ funkwhale_static_root }}"
|
|
- "frontend:{{ funkwhale_frontend }}"
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
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
|
|
|
|
nginx:
|
|
image: nginx
|
|
container_name: funkwhale_nginx
|
|
env_file: ./conf.env
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
- ./funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro
|
|
- "{{ funkwhale_import_music_directory_host }}:{{ funkwhale_import_music_directory }}:ro"
|
|
- "static:{{ funkwhale_static_root }}"
|
|
- "frontend:{{ funkwhale_frontend }}"
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
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
|
|
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.
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
networks:
|
|
- db
|
|
restart: unless-stopped
|