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" 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 }}" 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 }}" 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 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 }}" volumes: - db:/var/lib/postgresql/data networks: - db restart: unless-stopped