/
docker-compose.yml
103 lines (95 loc) · 2.39 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
version: "2"
services:
postgres:
restart: unless-stopped
networks:
- default
env_file: .env
image: postgres:11
volumes:
- ./data/postgres:/var/lib/postgresql/data
redis:
restart: unless-stopped
networks:
- default
env_file: .env
image: redis:3
volumes:
- ./data/redis:/data
celeryworker:
restart: unless-stopped
image: funkwhale/funkwhale:0.19.0
networks:
- default
depends_on:
- postgres
- redis
env_file: .env
command: celery -A funkwhale_api.taskapp worker -l INFO
environment:
- C_FORCE_ROOT=true
volumes:
- "data-serve-music:/srv/funkwhale/data/music:ro"
- "data-media-root:/srv/funkwhale/data/media"
celerybeat:
restart: unless-stopped
image: funkwhale/funkwhale:0.19.0
networks:
- default
depends_on:
- postgres
- redis
env_file: .env
command: celery -A funkwhale_api.taskapp beat -l INFO
api:
restart: unless-stopped
image: funkwhale/funkwhale:0.19.0
networks:
- default
depends_on:
- postgres
- redis
env_file: .env
volumes:
- "data-serve-music:/srv/funkwhale/data/music:ro"
- "data-media-root:/srv/funkwhale/data/media"
- "data-serve-static:/srv/funkwhale/data/static"
- "data-funkwhale-frontend:/frontend"
ports:
- "5000"
nginx:
restart: unless-stopped
image: nginx
networks:
- default
depends_on:
- api
env_file:
- .env
environment:
- "NGINX_MAX_BODY_SIZE=100M"
volumes:
- "./nginx/funkwhale.template:/etc/nginx/conf.d/funkwhale.template:ro"
- "./nginx/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro"
- "data-serve-music:/srv/funkwhale/data/music:ro"
- "data-media-root:/srv/funkwhale/data/media:ro"
- "data-serve-static:/srv/funkwhale/data/static:ro"
- "data-funkwhale-frontend:/frontend:ro"
ports:
- "127.0.0.1:5000: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;'"
volumes:
data-music-volume:
data-media-volume:
data-postgresql:
data-serve-music:
data-media-root:
data-serve-static:
data-funkwhale-frontend:
networks:
default: