You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
3.1 KiB
98 lines
3.1 KiB
4 years ago
|
version: "3"
|
||
|
|
||
|
services:
|
||
|
postgres:
|
||
|
image: ${DB_IMG:-postgres}:${DB_TAG:-12}
|
||
|
container_name: ${DB_CONTAINER_NAME:-funkwhale-db}
|
||
|
restart: ${DB_RESTART:-unless-stopped}
|
||
|
volumes:
|
||
|
- ${LOCAL_STACK_DIR}/postgres/data:/var/lib/postgresql/data
|
||
|
expose:
|
||
|
- 5432
|
||
|
env_file:
|
||
|
- postgres.env
|
||
|
|
||
|
redis:
|
||
|
image: ${RD_IMG:-redis}:${RD_TAG:-5}
|
||
|
container_name: ${RD_CONTAINER_NAME:-funkwhale-cache}
|
||
|
restart: ${RD_RESTART:-unless-stopped}
|
||
|
volumes:
|
||
|
- ${LOCAL_STACK_DIR}/redis/data:/data
|
||
|
expose:
|
||
|
- 6379
|
||
|
|
||
|
celeryworker:
|
||
|
restart: unless-stopped
|
||
|
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
||
|
depends_on:
|
||
|
- postgres
|
||
|
- redis
|
||
|
volumes:
|
||
|
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/docker/volumes/funkwhale/media/import_music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
|
||
|
- "${MEDIA_ROOT}:${MEDIA_ROOT}"
|
||
|
env_file: all.env
|
||
|
environment:
|
||
|
- C_FORCE_ROOT=true
|
||
|
# 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 -A funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY-0}
|
||
|
|
||
|
celerybeat:
|
||
|
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
||
|
restart: unless-stopped
|
||
|
depends_on:
|
||
|
- postgres
|
||
|
- redis
|
||
|
env_file: all.env
|
||
|
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
||
|
|
||
|
api:
|
||
|
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
||
|
restart: unless-stopped
|
||
|
depends_on:
|
||
|
- postgres
|
||
|
- redis
|
||
|
volumes:
|
||
|
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/docker/volumes/funkwhale/media/import_music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
|
||
|
- "${MEDIA_ROOT}:${MEDIA_ROOT}"
|
||
|
- "${STATIC_ROOT}:${STATIC_ROOT}"
|
||
|
- "${FUNKWHALE_FRONTEND_PATH}:/frontend"
|
||
|
expose:
|
||
|
- 5000
|
||
|
env_file: all.env
|
||
|
|
||
|
nginx:
|
||
|
image: nginx
|
||
|
restart: unless-stopped
|
||
|
depends_on:
|
||
|
- api
|
||
|
volumes:
|
||
|
- "./nginx/funkwhale.template:/etc/nginx/conf.d/funkwhale.template:ro"
|
||
|
- "./nginx/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro"
|
||
|
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/docker/volumes/funkwhale/media/import_music}:${MUSIC_DIRECTORY_SERVE_PATH-/srv/docker/volumes/funkwhale/media/import_music}:ro"
|
||
|
- "${MEDIA_ROOT}:${MEDIA_ROOT}:ro"
|
||
|
- "${STATIC_ROOT}:${STATIC_ROOT}:ro"
|
||
|
- "${FUNKWHALE_FRONTEND_PATH}:/frontend:ro"
|
||
|
expose:
|
||
|
- 80
|
||
|
env_file:
|
||
|
- all.env
|
||
|
- nginx.env
|
||
|
command: >
|
||
|
sh -c "envsubst \"`env | awk -F = '{printf \" $$%s\", $$1}'`\"
|
||
|
< /etc/nginx/conf.d/funkwhale.template
|
||
|
> /etc/nginx/conf.d/default.conf
|
||
|
&& cat /etc/nginx/conf.d/default.conf
|
||
|
&& nginx -g 'daemon off;'"
|
||
|
|
||
|
networks:
|
||
|
default:
|
||
|
external:
|
||
|
name: ${NETWORK}
|