2018-08-31 17:21:46 +00:00
|
|
|
version: "3"
|
2017-06-25 21:02:36 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
restart: unless-stopped
|
2019-04-12 08:50:12 +00:00
|
|
|
networks:
|
|
|
|
- default
|
2017-06-25 21:02:36 +00:00
|
|
|
env_file: .env
|
2020-02-15 11:01:19 +00:00
|
|
|
environment:
|
|
|
|
- "POSTGRES_HOST_AUTH_METHOD=trust"
|
2019-01-11 09:45:38 +00:00
|
|
|
image: postgres:11
|
2017-06-28 18:41:25 +00:00
|
|
|
volumes:
|
|
|
|
- ./data/postgres:/var/lib/postgresql/data
|
2017-06-25 21:02:36 +00:00
|
|
|
|
|
|
|
redis:
|
|
|
|
restart: unless-stopped
|
2019-04-12 08:50:12 +00:00
|
|
|
networks:
|
|
|
|
- default
|
2017-06-25 21:02:36 +00:00
|
|
|
env_file: .env
|
2020-02-02 08:10:04 +00:00
|
|
|
image: redis:5
|
2017-06-25 21:02:36 +00:00
|
|
|
volumes:
|
2017-06-28 18:41:25 +00:00
|
|
|
- ./data/redis:/data
|
2017-06-25 21:02:36 +00:00
|
|
|
|
|
|
|
celeryworker:
|
|
|
|
restart: unless-stopped
|
|
|
|
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
2019-04-12 08:50:12 +00:00
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
- redis
|
2017-06-25 21:02:36 +00:00
|
|
|
env_file: .env
|
2018-04-19 18:23:21 +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
|
2019-12-20 14:36:18 +00:00
|
|
|
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY-0}
|
2017-06-25 21:02:36 +00:00
|
|
|
environment:
|
|
|
|
- C_FORCE_ROOT=true
|
|
|
|
volumes:
|
2018-07-08 09:30:53 +00:00
|
|
|
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funkwhale/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
|
|
|
|
- "${MEDIA_ROOT}:${MEDIA_ROOT}"
|
2017-06-25 21:02:36 +00:00
|
|
|
|
|
|
|
celerybeat:
|
|
|
|
restart: unless-stopped
|
|
|
|
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
2019-04-12 08:50:12 +00:00
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
depends_on:
|
2017-06-25 21:02:36 +00:00
|
|
|
- postgres
|
|
|
|
- redis
|
2019-04-12 08:50:12 +00:00
|
|
|
env_file: .env
|
2020-01-06 09:06:47 +00:00
|
|
|
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
2017-06-25 21:02:36 +00:00
|
|
|
|
|
|
|
api:
|
|
|
|
restart: unless-stopped
|
|
|
|
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
2019-04-12 08:50:12 +00:00
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
- redis
|
2017-06-25 21:02:36 +00:00
|
|
|
env_file: .env
|
|
|
|
volumes:
|
2018-07-08 09:30:53 +00:00
|
|
|
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funkwhale/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
|
|
|
|
- "${MEDIA_ROOT}:${MEDIA_ROOT}"
|
|
|
|
- "${STATIC_ROOT}:${STATIC_ROOT}"
|
2018-08-31 17:21:46 +00:00
|
|
|
- "${FUNKWHALE_FRONTEND_PATH}:/frontend"
|
2017-06-25 21:02:36 +00:00
|
|
|
ports:
|
2018-08-31 17:21:46 +00:00
|
|
|
- "5000"
|
2018-04-05 16:31:13 +00:00
|
|
|
|
2018-08-31 17:21:46 +00:00
|
|
|
nginx:
|
2018-11-19 06:45:23 +00:00
|
|
|
restart: unless-stopped
|
2018-08-31 17:21:46 +00:00
|
|
|
image: nginx
|
2019-04-12 08:50:12 +00:00
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
depends_on:
|
|
|
|
- api
|
2018-08-31 17:21:46 +00:00
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
environment:
|
|
|
|
# Override those variables in your .env file if needed
|
2019-01-11 08:51:23 +00:00
|
|
|
- "NGINX_MAX_BODY_SIZE=${NGINX_MAX_BODY_SIZE-100M}"
|
2018-08-31 17:21:46 +00:00
|
|
|
volumes:
|
|
|
|
- "./nginx/funkwhale.template:/etc/nginx/conf.d/funkwhale.template:ro"
|
|
|
|
- "./nginx/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro"
|
2020-05-21 12:26:19 +00:00
|
|
|
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funkwhale/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
|
2018-08-31 17:21:46 +00:00
|
|
|
- "${MEDIA_ROOT}:${MEDIA_ROOT}:ro"
|
|
|
|
- "${STATIC_ROOT}:${STATIC_ROOT}:ro"
|
|
|
|
- "${FUNKWHALE_FRONTEND_PATH}:/frontend:ro"
|
|
|
|
ports:
|
|
|
|
# override those variables in your .env file if needed
|
|
|
|
- "${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT}:80"
|
|
|
|
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;'"
|
2019-04-12 08:50:12 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
default:
|