2018-08-11 14:21:14 +00:00
|
|
|
version: "3"
|
2017-06-23 21:00:42 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
front:
|
2022-06-30 12:10:19 +00:00
|
|
|
build:
|
|
|
|
context: front
|
|
|
|
dockerfile: Dockerfile.dev
|
2018-03-29 17:55:24 +00:00
|
|
|
env_file:
|
|
|
|
- .env.dev
|
|
|
|
- .env
|
2017-06-23 21:00:42 +00:00
|
|
|
environment:
|
|
|
|
- "HOST=0.0.0.0"
|
2018-09-22 12:29:30 +00:00
|
|
|
- "VUE_PORT=${VUE_PORT-8080}"
|
2018-09-09 14:59:28 +00:00
|
|
|
ports:
|
2018-12-19 13:03:21 +00:00
|
|
|
- "${VUE_PORT-8080}"
|
2017-06-23 21:00:42 +00:00
|
|
|
volumes:
|
2018-08-11 14:21:14 +00:00
|
|
|
- "./front:/app"
|
|
|
|
- "/app/node_modules"
|
|
|
|
- "./po:/po"
|
2018-04-08 16:19:32 +00:00
|
|
|
networks:
|
|
|
|
- internal
|
2022-04-02 17:38:14 +00:00
|
|
|
command: "yarn dev --host --base /front/"
|
2017-06-23 21:00:42 +00:00
|
|
|
|
|
|
|
postgres:
|
2018-03-29 17:55:24 +00:00
|
|
|
env_file:
|
|
|
|
- .env.dev
|
|
|
|
- .env
|
2022-07-10 17:31:37 +00:00
|
|
|
image: postgres:${POSTGRES_VERSION-11}-alpine
|
2020-02-15 11:01:19 +00:00
|
|
|
environment:
|
|
|
|
- "POSTGRES_HOST_AUTH_METHOD=trust"
|
2019-10-21 21:02:46 +00:00
|
|
|
command: postgres ${POSTGRES_ARGS-}
|
2018-04-08 16:19:32 +00:00
|
|
|
volumes:
|
|
|
|
- "./data/${COMPOSE_PROJECT_NAME-node1}/postgres:/var/lib/postgresql/data"
|
|
|
|
networks:
|
|
|
|
- internal
|
2017-06-23 21:00:42 +00:00
|
|
|
|
|
|
|
redis:
|
2018-03-29 17:55:24 +00:00
|
|
|
env_file:
|
|
|
|
- .env.dev
|
|
|
|
- .env
|
2022-07-10 17:31:37 +00:00
|
|
|
image: redis:7-alpine
|
2018-04-08 16:19:32 +00:00
|
|
|
volumes:
|
|
|
|
- "./data/${COMPOSE_PROJECT_NAME-node1}/redis:/data"
|
|
|
|
networks:
|
|
|
|
- internal
|
2017-06-23 21:00:42 +00:00
|
|
|
|
2019-01-21 12:54:46 +00:00
|
|
|
api:
|
2018-03-29 17:55:24 +00:00
|
|
|
env_file:
|
|
|
|
- .env.dev
|
|
|
|
- .env
|
2022-07-10 17:31:37 +00:00
|
|
|
build:
|
2017-06-23 21:00:42 +00:00
|
|
|
context: ./api
|
2019-01-21 12:54:46 +00:00
|
|
|
dockerfile: Dockerfile
|
|
|
|
args:
|
|
|
|
install_dev_deps: 1
|
2022-07-10 17:31:37 +00:00
|
|
|
image: funkwhale-api
|
2019-01-21 12:54:46 +00:00
|
|
|
entrypoint: compose/django/dev-entrypoint.sh
|
2019-07-18 10:51:57 +00:00
|
|
|
command: >
|
|
|
|
bash -c "python manage.py collectstatic --no-input
|
|
|
|
&& uvicorn --reload config.asgi:application --host 0.0.0.0 --port 5000 --reload-dir config/ --reload-dir=funkwhale_api/"
|
2019-01-21 12:54:46 +00:00
|
|
|
volumes:
|
|
|
|
- ./api:/app
|
2019-03-20 18:38:41 +00:00
|
|
|
- "${MUSIC_DIRECTORY_SERVE_PATH-./data/music}:/music:ro"
|
2019-06-20 08:27:07 +00:00
|
|
|
- "./data/plugins:/srv/funkwhale/plugins"
|
2019-07-18 10:51:57 +00:00
|
|
|
- "./data/staticfiles:/staticfiles"
|
2019-07-16 15:32:35 +00:00
|
|
|
- "./data/media:/data/media"
|
2017-06-23 21:00:42 +00:00
|
|
|
environment:
|
2018-04-08 16:19:32 +00:00
|
|
|
- "FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME-localhost}"
|
|
|
|
- "FUNKWHALE_HOSTNAME_SUFFIX=funkwhale.test"
|
|
|
|
- "FUNKWHALE_HOSTNAME_PREFIX=${COMPOSE_PROJECT_NAME}"
|
|
|
|
- "FUNKWHALE_PROTOCOL=${FUNKWHALE_PROTOCOL-http}"
|
2017-12-13 22:36:10 +00:00
|
|
|
- "DATABASE_URL=postgresql://postgres@postgres/postgres"
|
|
|
|
- "CACHE_URL=redis://redis:6379/0"
|
2019-07-18 10:51:57 +00:00
|
|
|
- "STATIC_ROOT=/staticfiles"
|
2019-07-16 15:32:35 +00:00
|
|
|
- "MEDIA_ROOT=/data/media"
|
2019-03-13 09:20:57 +00:00
|
|
|
|
2019-04-12 10:13:06 +00:00
|
|
|
depends_on:
|
2019-01-21 12:54:46 +00:00
|
|
|
- postgres
|
2019-04-23 16:00:00 +00:00
|
|
|
# - minio
|
2019-01-21 12:54:46 +00:00
|
|
|
- redis
|
2018-04-08 16:19:32 +00:00
|
|
|
networks:
|
|
|
|
- internal
|
2019-01-21 12:54:46 +00:00
|
|
|
cap_add:
|
|
|
|
- SYS_PTRACE
|
2022-05-31 08:11:15 +00:00
|
|
|
extra_hosts:
|
|
|
|
- "node1.funkwhale.test:172.17.0.1"
|
|
|
|
- "node2.funkwhale.test:172.17.0.1"
|
|
|
|
- "node3.funkwhale.test:172.17.0.1"
|
|
|
|
|
2019-01-21 12:54:46 +00:00
|
|
|
|
|
|
|
celeryworker:
|
2018-03-29 17:55:24 +00:00
|
|
|
env_file:
|
|
|
|
- .env.dev
|
|
|
|
- .env
|
2022-07-10 17:31:37 +00:00
|
|
|
image: funkwhale-api
|
2019-04-12 10:13:06 +00:00
|
|
|
depends_on:
|
2019-01-21 12:54:46 +00:00
|
|
|
- postgres
|
2019-04-23 16:00:00 +00:00
|
|
|
# - minio
|
2019-01-21 12:54:46 +00:00
|
|
|
- redis
|
2019-12-20 14:36:18 +00:00
|
|
|
command: celery -A funkwhale_api.taskapp worker -l debug -B --concurrency=${CELERYD_CONCURRENCY-0}
|
2017-07-17 20:00:32 +00:00
|
|
|
environment:
|
2018-04-08 16:19:32 +00:00
|
|
|
- "FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME-localhost}"
|
|
|
|
- "FUNKWHALE_HOSTNAME_SUFFIX=funkwhale.test"
|
|
|
|
- "FUNKWHALE_HOSTNAME_PREFIX=${COMPOSE_PROJECT_NAME}"
|
|
|
|
- "FUNKWHALE_PROTOCOL=${FUNKWHALE_PROTOCOL-http}"
|
2017-07-17 20:00:32 +00:00
|
|
|
- "DATABASE_URL=postgresql://postgres@postgres/postgres"
|
|
|
|
- "CACHE_URL=redis://redis:6379/0"
|
2019-07-16 15:32:35 +00:00
|
|
|
- "MEDIA_ROOT=/data/media"
|
2019-01-21 12:54:46 +00:00
|
|
|
volumes:
|
|
|
|
- ./api:/app
|
2019-03-20 18:38:41 +00:00
|
|
|
- "${MUSIC_DIRECTORY_SERVE_PATH-./data/music}:/music:ro"
|
2019-06-20 08:27:07 +00:00
|
|
|
- "./data/plugins:/srv/funkwhale/plugins"
|
2019-07-16 15:32:35 +00:00
|
|
|
- "./data/media:/data/media"
|
2018-04-08 16:19:32 +00:00
|
|
|
networks:
|
|
|
|
- internal
|
2022-05-31 08:11:15 +00:00
|
|
|
extra_hosts:
|
|
|
|
- "node1.funkwhale.test:172.17.0.1"
|
|
|
|
- "node2.funkwhale.test:172.17.0.1"
|
|
|
|
- "node3.funkwhale.test:172.17.0.1"
|
|
|
|
|
|
|
|
|
2017-06-28 21:30:26 +00:00
|
|
|
nginx:
|
2018-03-29 18:30:24 +00:00
|
|
|
command: /entrypoint.sh
|
2018-03-29 17:55:24 +00:00
|
|
|
env_file:
|
|
|
|
- .env.dev
|
|
|
|
- .env
|
2017-06-28 21:30:26 +00:00
|
|
|
image: nginx
|
2019-03-13 09:20:57 +00:00
|
|
|
ports:
|
|
|
|
- "${NGINX_PORTS_MAPPING-8000:80}"
|
2018-03-29 18:30:24 +00:00
|
|
|
environment:
|
2019-01-11 08:51:23 +00:00
|
|
|
- "NGINX_MAX_BODY_SIZE=${NGINX_MAX_BODY_SIZE-100M}"
|
2018-12-19 13:03:21 +00:00
|
|
|
- "FUNKWHALE_API_IP=${FUNKHALE_API_IP-api}"
|
|
|
|
- "FUNKWHALE_API_PORT=${FUNKWHALE_API_PORT-5000}"
|
|
|
|
- "FUNKWHALE_FRONT_IP=${FUNKHALE_FRONT_IP-front}"
|
|
|
|
- "FUNKWHALE_FRONT_PORT=${VUE_PORT-8080}"
|
2018-04-08 16:19:32 +00:00
|
|
|
- "COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME- }"
|
|
|
|
- "FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME-localhost}"
|
2018-12-20 16:36:32 +00:00
|
|
|
depends_on:
|
2017-06-28 21:30:26 +00:00
|
|
|
- api
|
|
|
|
- front
|
|
|
|
volumes:
|
2018-12-19 13:03:21 +00:00
|
|
|
- ./docker/nginx/conf.dev:/etc/nginx/nginx.conf.template:ro
|
2018-03-29 18:30:24 +00:00
|
|
|
- ./docker/nginx/entrypoint.sh:/entrypoint.sh:ro
|
2019-03-20 18:38:41 +00:00
|
|
|
- "${MUSIC_DIRECTORY_SERVE_PATH-./data/music}:/music:ro"
|
2018-12-19 13:03:21 +00:00
|
|
|
- ./deploy/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro
|
2019-07-10 12:58:20 +00:00
|
|
|
- "./front:/frontend:ro"
|
2019-07-18 10:51:57 +00:00
|
|
|
- "./data/staticfiles:/staticfiles:ro"
|
2019-07-16 15:32:35 +00:00
|
|
|
- "./data/media:/protected/media:ro"
|
2018-04-08 16:19:32 +00:00
|
|
|
networks:
|
2018-12-19 13:03:21 +00:00
|
|
|
- federation
|
2018-04-08 16:19:32 +00:00
|
|
|
- internal
|
2018-12-19 13:03:21 +00:00
|
|
|
|
|
|
|
labels:
|
|
|
|
traefik.backend: "${COMPOSE_PROJECT_NAME-node1}"
|
2019-12-09 12:59:54 +00:00
|
|
|
traefik.frontend.rule: "Host:${COMPOSE_PROJECT_NAME-node1}.funkwhale.test,${NODE_IP-127.0.0.1},${DJANGO_ALLOWED_HOSTS}"
|
2018-12-19 13:03:21 +00:00
|
|
|
traefik.enable: "true"
|
|
|
|
traefik.federation.protocol: "http"
|
|
|
|
traefik.federation.port: "80"
|
|
|
|
traefik.frontend.passHostHeader: true
|
|
|
|
traefik.docker.network: federation
|
|
|
|
|
2018-03-12 22:38:39 +00:00
|
|
|
docs:
|
|
|
|
build: docs
|
|
|
|
command: python serve.py
|
|
|
|
volumes:
|
|
|
|
- ".:/app/"
|
|
|
|
ports:
|
2018-08-11 14:21:14 +00:00
|
|
|
- "35730:35730"
|
|
|
|
- "8001:8001"
|
2018-04-08 16:19:32 +00:00
|
|
|
|
2018-04-26 12:26:11 +00:00
|
|
|
api-docs:
|
2020-12-02 23:55:02 +00:00
|
|
|
image: swaggerapi/swagger-ui:v3.37.2
|
2018-04-26 12:26:11 +00:00
|
|
|
environment:
|
|
|
|
- "API_URL=/swagger.yml"
|
|
|
|
ports:
|
2018-08-11 14:21:14 +00:00
|
|
|
- "8002:8080"
|
2018-04-26 12:26:11 +00:00
|
|
|
volumes:
|
2018-05-22 20:57:20 +00:00
|
|
|
- "./docs/swagger.yml:/usr/share/nginx/html/swagger.yml"
|
2020-07-05 09:00:04 +00:00
|
|
|
- "./docs/api:/usr/share/nginx/html/api"
|
2018-04-26 12:26:11 +00:00
|
|
|
|
2019-04-23 16:00:00 +00:00
|
|
|
# minio:
|
|
|
|
# image: minio/minio
|
|
|
|
# command: server /data
|
|
|
|
# volumes:
|
|
|
|
# - "./data/${COMPOSE_PROJECT_NAME-node1}/minio:/data"
|
|
|
|
# environment:
|
|
|
|
# - "MINIO_ACCESS_KEY=${AWS_ACCESS_KEY_ID-access_key}"
|
|
|
|
# - "MINIO_SECRET_KEY=${AWS_SECRET_ACCESS_KEY-secret_key}"
|
|
|
|
# - "MINIO_HTTP_TRACE: /dev/stdout"
|
|
|
|
# ports:
|
|
|
|
# - "9000:9000"
|
|
|
|
# networks:
|
|
|
|
# - federation
|
|
|
|
# - internal
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-08 16:19:32 +00:00
|
|
|
networks:
|
2018-08-11 14:21:14 +00:00
|
|
|
? internal
|
2018-04-08 16:19:32 +00:00
|
|
|
federation:
|
|
|
|
external:
|
|
|
|
name: federation
|