-
-
Notifications
You must be signed in to change notification settings - Fork 273
/
docker-compose.yml
180 lines (171 loc) · 4.5 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
services:
db:
image: postgres:16-alpine
container_name: raveberry-db
environment:
- POSTGRES_DB=raveberry
- POSTGRES_USER=raveberry
- POSTGRES_PASSWORD=raveberry
volumes:
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/raveberry/data:/var/lib/postgresql/data
restart: unless-stopped
#networks:
# - proxy
redis:
image: redis:7-alpine
container_name: raveberry-redis
restart: unless-stopped
#networks:
# - proxy
celery:
image: raveberry/raveberry
container_name: raveberry-celery
volumes:
- songs-cache:/Music/raveberry
# used for visualization
- /tmp/.X11-unix:/tmp/.X11-unix # X server to open a window
- /dev/dri:/dev/dri # graphics card for hardware acceleration
- "/run/user/${UID:-1000}/pulse:/run/pulse" # pulse access to get audio data
depends_on:
- db
- redis
environment:
- PYTHONOPTIMIZE=1
- ADMIN_PASSWORD
- MOD_PASSWORD
- REMOTE_URL
- SPOTIFY_USERNAME
- SPOTIFY_PASSWORD
- SPOTIFY_CLIENT_ID
- SPOTIFY_CLIENT_SECRET
- SOUNDCLOUD_AUTH_TOKEN
- JAMENDO_CLIENT_ID
- DOCKER=1
- POSTGRES_HOST
- POSTGRES_PORT
- REDIS_HOST
- REDIS_PORT
- MOPIDY_HOST
- MOPIDY_PORT
- ICECAST_HOST
- ICECAST_PORT
#networks:
# - proxy
command: /usr/local/bin/celery -A core.tasks worker -O fair -c 6
restart: unless-stopped
icecast:
image: raveberry/raveberry-icecast
container_name: raveberry-icecast
environment:
- ICECAST_ADMIN_PASSWORD
- STREAM_USERNAME
- STREAM_PASSWORD
- STREAM_NOAUTH
#networks:
# - proxy
# uncomment this port mapping if you need to access icecast's web interface
#ports:
# - 8000:8000
# use a custom icecast config with this mapping
#volumes:
# - /path/to/icecast.xml:/etc/icecast.xml
restart: unless-stopped
mopidy:
image: raveberry/raveberry-mopidy
container_name: raveberry-mopidy
# run with the same id as host user in order to access pulseaudio
user: "${UID:-1000}:${GID:-1000}"
environment:
- MOPIDY_OUTPUT
- SPOTIFY_USERNAME
- SPOTIFY_PASSWORD
- SPOTIFY_CLIENT_ID
- SPOTIFY_CLIENT_SECRET
- SOUNDCLOUD_AUTH_TOKEN
- JAMENDO_CLIENT_ID
volumes:
- songs-cache:/Music/raveberry
# Comment this line if pulse does not work.
- "/run/user/${UID:-1000}/pulse:/run/pulse"
# to customize mopidy config, mount a custom config file with this line
# - /path/to/mopidy.conf:/config/mopidy.conf
depends_on:
- icecast
#networks:
# - proxy
restart: unless-stopped
# Use these three lines to use alsa if pulse is not working.
#user: root
#devices:
# - "/dev/snd:/dev/snd"
daphne:
image: raveberry/raveberry
container_name: raveberry-daphne
expose:
- 9000
volumes:
- songs-cache:/Music/raveberry
depends_on:
- db
- redis
- celery
- mopidy
environment:
- PYTHONOPTIMIZE=1
- ADMIN_PASSWORD
- MOD_PASSWORD
- REMOTE_URL
- SPOTIFY_USERNAME
- SPOTIFY_PASSWORD
- SPOTIFY_CLIENT_ID
- SPOTIFY_CLIENT_SECRET
- SOUNDCLOUD_AUTH_TOKEN
- JAMENDO_CLIENT_ID
- DOCKER=1
- POSTGRES_HOST
- POSTGRES_PORT
- REDIS_HOST
- REDIS_PORT
- MOPIDY_HOST
- MOPIDY_PORT
- ICECAST_HOST
- ICECAST_PORT
#networks:
# - proxy
restart: unless-stopped
nginx:
image: raveberry/raveberry-nginx
container_name: raveberry-nginx
ports:
- 9870:80
expose:
- 80
environment:
- DAPHNE_HOST
- DAPHNE_PORT
- ICECAST_HOST
- ICECAST_PORT
#networks:
# - proxy
depends_on:
- daphne
restart: unless-stopped
#labels:
# - traefik.enable=true
# - traefik.http.routers.raveberry.rule=Host(`raveberry.example.com`)
# - traefik.http.services.raveberry.loadbalancer.server.port=80
# - traefik.docker.network=proxy
# # Part for optional traefik middlewares
# - traefik.http.routers.raveberry.middlewares=local-ipwhitelist@file
volumes:
songs-cache:
# If you want to access downloaded files on your host system,
# uncomment the following lines and choose a folder.
# Make sure the folder is writable by UID 33 (eg chmod -R o+rw folder)
#driver_opts:
# type: 'none'
# o: 'bind'
# device: '/path/to/folder/'
#networks:
# proxy:
# external: true