funkwhale/docker-compose.yml

116 lines
3.0 KiB
YAML
Raw Permalink Normal View History

2022-11-13 23:14:14 +00:00
version: "3"
services:
postgres:
restart: unless-stopped
env_file: .env
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
image: postgres:15-alpine
networks:
- default
2022-11-13 23:14:14 +00:00
volumes:
- ./data/postgres:/var/lib/postgresql/data
redis:
restart: unless-stopped
env_file: .env
image: redis:7-alpine
2022-11-13 23:14:14 +00:00
networks:
- default
volumes:
- ./data/redis:/data
celeryworker:
restart: unless-stopped
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
2022-11-13 23:14:14 +00:00
depends_on:
- postgres
- redis
env_file: .env
networks:
- default
2022-11-13 23:14:14 +00:00
# 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
command:
- celery
- --app=funkwhale_api.taskapp
- worker
- --loglevel=INFO
- --concurrency=${CELERYD_CONCURRENCY-0}
2022-11-13 23:14:14 +00:00
environment:
- C_FORCE_ROOT=true
volumes:
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funkwhale/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
- "${MEDIA_ROOT}:${MEDIA_ROOT}"
celerybeat:
restart: unless-stopped
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
2022-11-13 23:14:14 +00:00
networks:
- default
command:
- celery
- --app=funkwhale_api.taskapp
- beat
- --loglevel=INFO
2022-11-13 23:14:14 +00:00
depends_on:
- postgres
- redis
env_file: .env
api:
restart: unless-stopped
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
2022-11-13 23:14:14 +00:00
networks:
2023-01-17 05:05:32 +00:00
default:
aliases:
- funkwhale_api
mail:
2022-11-13 23:14:14 +00:00
depends_on:
- postgres
- redis
env_file: .env
volumes:
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funkwhale/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
- "${MEDIA_ROOT}:${MEDIA_ROOT}"
- "${STATIC_ROOT}:${STATIC_ROOT}"
front:
2022-11-13 23:14:14 +00:00
restart: unless-stopped
image: funkwhale/front:${FUNKWHALE_VERSION:-latest}
2022-11-13 23:14:14 +00:00
networks:
- default
- httpsproxy
2022-11-13 23:14:14 +00:00
depends_on:
- api
env_file:
- .env
2023-01-17 05:05:32 +00:00
labels:
- "traefik.enable=true"
- "traefik.http.services.funkwhale.loadbalancer.server.port=80"
- "traefik.http.routers.funkwhale.rule=Host(`audio.solarpunk.moe`)"
- "traefik.http.routers.funkwhale.tls.certresolver=leresolver"
- "traefik.http.routers.funkwhale.entrypoints=websecure"
environment:
# Override those variables in your .env file if needed
- "NGINX_MAX_BODY_SIZE=${NGINX_MAX_BODY_SIZE-100M}"
2022-11-13 23:14:14 +00:00
volumes:
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funkwhale/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
- "${MEDIA_ROOT}:${MEDIA_ROOT}:ro"
- "${STATIC_ROOT}:/usr/share/nginx/html/staticfiles:ro"
2022-11-13 23:14:14 +00:00
networks:
mail:
external: true
httpsproxy:
external: true
2022-11-13 23:14:14 +00:00
default: