Use network/depends_on instead of links in docker-compose.yml (!716)
This commit is contained in:
parent
4d55c844f4
commit
265e6eb3d4
|
@ -0,0 +1 @@
|
||||||
|
Use network/depends_on instead of links in docker-compose.yml (!716)
|
|
@ -3,6 +3,8 @@ version: "3"
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
env_file: .env
|
env_file: .env
|
||||||
image: postgres:11
|
image: postgres:11
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -10,6 +12,8 @@ services:
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
env_file: .env
|
env_file: .env
|
||||||
image: redis:3
|
image: redis:3
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -18,6 +22,11 @@ services:
|
||||||
celeryworker:
|
celeryworker:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
- redis
|
||||||
env_file: .env
|
env_file: .env
|
||||||
# Celery workers handle background tasks (such file imports or federation
|
# Celery workers handle background tasks (such file imports or federation
|
||||||
# messaging). The more processes a worker gets, the more tasks
|
# messaging). The more processes a worker gets, the more tasks
|
||||||
|
@ -28,9 +37,6 @@ services:
|
||||||
# flag:
|
# flag:
|
||||||
# celery -A funkwhale_api.taskapp worker -l INFO --concurrency=4
|
# celery -A funkwhale_api.taskapp worker -l INFO --concurrency=4
|
||||||
command: celery -A funkwhale_api.taskapp worker -l INFO
|
command: celery -A funkwhale_api.taskapp worker -l INFO
|
||||||
links:
|
|
||||||
- postgres
|
|
||||||
- redis
|
|
||||||
environment:
|
environment:
|
||||||
- C_FORCE_ROOT=true
|
- C_FORCE_ROOT=true
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -40,15 +46,22 @@ services:
|
||||||
celerybeat:
|
celerybeat:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
||||||
env_file: .env
|
networks:
|
||||||
command: celery -A funkwhale_api.taskapp beat -l INFO
|
- default
|
||||||
links:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
|
env_file: .env
|
||||||
|
command: celery -A funkwhale_api.taskapp beat -l INFO
|
||||||
|
|
||||||
api:
|
api:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
- redis
|
||||||
env_file: .env
|
env_file: .env
|
||||||
volumes:
|
volumes:
|
||||||
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funkwhale/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
|
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funkwhale/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
|
||||||
|
@ -57,13 +70,14 @@ services:
|
||||||
- "${FUNKWHALE_FRONTEND_PATH}:/frontend"
|
- "${FUNKWHALE_FRONTEND_PATH}:/frontend"
|
||||||
ports:
|
ports:
|
||||||
- "5000"
|
- "5000"
|
||||||
links:
|
|
||||||
- postgres
|
|
||||||
- redis
|
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: nginx
|
image: nginx
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
depends_on:
|
||||||
|
- api
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
|
@ -85,5 +99,6 @@ services:
|
||||||
> /etc/nginx/conf.d/default.conf
|
> /etc/nginx/conf.d/default.conf
|
||||||
&& cat /etc/nginx/conf.d/default.conf
|
&& cat /etc/nginx/conf.d/default.conf
|
||||||
&& nginx -g 'daemon off;'"
|
&& nginx -g 'daemon off;'"
|
||||||
links:
|
|
||||||
- api
|
networks:
|
||||||
|
default:
|
||||||
|
|
Loading…
Reference in New Issue