|
|
|
version: "3"
|
|
|
|
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: ${DB_IMG:-postgres}:${DB_TAG:-12}
|
|
|
|
container_name: ${DB_CONTAINER_NAME:-funkwhale-db}
|
|
|
|
restart: ${DB_RESTART:-unless-stopped}
|
|
|
|
volumes:
|
|
|
|
- ${HOST_DB_DIR}:/var/lib/postgresql/data
|
|
|
|
expose:
|
|
|
|
- 5432
|
|
|
|
env_file:
|
|
|
|
- postgres.env
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: ${RD_IMG:-redis}:${RD_TAG:-6}
|
|
|
|
container_name: ${RD_CONTAINER_NAME:-funkwhale-cache}
|
|
|
|
restart: ${RD_RESTART:-unless-stopped}
|
|
|
|
volumes:
|
|
|
|
- ${HOST_CACHE_DIR}:/data
|
|
|
|
expose:
|
|
|
|
- 6379
|
|
|
|
|
|
|
|
celeryworker:
|
|
|
|
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
|
|
|
container_name: ${CW_CONTAINER_NAME:-funkwhale-celeryworker}
|
|
|
|
restart: ${CW_RESTART:-unless-stopped}
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
- internet-access
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
- redis
|
|
|
|
volumes:
|
|
|
|
- "${HOST_MUSIC_DIRECTORY_SERVE_PATH}:/srv/wwww/music:ro"
|
|
|
|
- "${HOST_MEDIA_ROOT}:/srv/wwww/media"
|
|
|
|
env_file:
|
|
|
|
- all.env
|
|
|
|
- shared.env
|
|
|
|
environment:
|
|
|
|
- C_FORCE_ROOT=true
|
|
|
|
- FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME}
|
|
|
|
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY:-0}
|
|
|
|
|
|
|
|
celerybeat:
|
|
|
|
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
|
|
|
container_name: ${CB_CONTAINER_NAME:-funkwhale-celerybeat}
|
|
|
|
restart: ${CB_RESTART:-unless-stopped}
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
- redis
|
|
|
|
env_file:
|
|
|
|
- all.env
|
|
|
|
environment:
|
|
|
|
- FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME} # This is necessary
|
|
|
|
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
|
|
|
|
|
|
|
api:
|
|
|
|
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
|
|
|
container_name: ${AP_CONTAINER_NAME:-funkwhale-api}
|
|
|
|
restart: ${AP_RESTART:-unless-stopped}
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
- internet-access
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
- redis
|
|
|
|
volumes:
|
|
|
|
- "${HOST_MUSIC_DIRECTORY_SERVE_PATH}:/srv/wwww/music:ro"
|
|
|
|
- "${HOST_MEDIA_ROOT}:/srv/wwww/media"
|
|
|
|
- "${HOST_STATIC_ROOT}:/srv/wwww/static"
|
|
|
|
- "${HOST_FUNKWHALE_FRONTEND_PATH}:/frontend"
|
|
|
|
expose:
|
|
|
|
- 5000
|
|
|
|
env_file:
|
|
|
|
- all.env
|
|
|
|
- shared.env
|
|
|
|
environment:
|
|
|
|
- FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME}
|
|
|
|
|
|
|
|
nginx:
|
|
|
|
image: ${WB_IMG:-nginx}:${WB_TAG:-latest}
|
|
|
|
container_name: ${WB_CONTAINER_NAME:-funkwhale-web}
|
|
|
|
restart: ${WB_RESTART:-unless-stopped}
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
- main-webservices
|
|
|
|
depends_on:
|
|
|
|
- api
|
|
|
|
volumes:
|
|
|
|
- "./nginx/funkwhale.template:/etc/nginx/conf.d/funkwhale.template:ro"
|
|
|
|
- "./nginx/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro"
|
|
|
|
- "${HOST_MUSIC_DIRECTORY_SERVE_PATH}:/srv/wwww/music:ro"
|
|
|
|
- "${HOST_MEDIA_ROOT}:/srv/wwww/media:ro"
|
|
|
|
- "${HOST_STATIC_ROOT}:/srv/wwww/static:ro"
|
|
|
|
- "${HOST_FUNKWHALE_FRONTEND_PATH}:/srv/wwww/frontend:ro"
|
|
|
|
expose:
|
|
|
|
- 80
|
|
|
|
env_file:
|
|
|
|
- nginx.env
|
|
|
|
environment:
|
|
|
|
- FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME}
|
|
|
|
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:
|
|
|
|
internal: true
|
|
|
|
internet-access:
|
|
|
|
internal: ${NO_INTERNET_ACC}
|
|
|
|
main-webservices:
|
|
|
|
external:
|
|
|
|
name: ${REVERSE_PROXY_NETWORK}
|