-
-
Notifications
You must be signed in to change notification settings - Fork 239
/
Copy pathdocker-compose.yml
158 lines (143 loc) · 3.74 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
# IMPORTANT NOTE: Volume paths mounted on containers are relative to the
# directory that this file is in (`docker/`) and so probably need to start with
# `../` to refer to a directory in the main code checkout
volumes:
redis:
timescaledb:
rabbitmq:
# The contents of /root, so that bash and ipython can store history
web_home:
couchdb:
services:
redis:
image: redis:6.2.2
volumes:
- redis:/data:z
lb_db:
image: timescale/timescaledb:2.6.0-pg12
volumes:
- timescaledb:/var/lib/postgresql/data:z
ports:
- "127.0.0.1:7432:5432"
environment:
POSTGRES_PASSWORD: 'postgres'
couchdb:
image: couchdb:3.2.2
environment:
COUCHDB_USER: listenbrainz
COUCHDB_PASSWORD: listenbrainz
volumes:
- ./couchdb_test.ini:/opt/couchdb/etc/local.ini
- couchdb:/var/lib/couchdb
ports:
- "127.0.0.1:5984:5984"
rabbitmq:
image: rabbitmq:3.8.16-management
volumes:
- rabbitmq:/var/lib/rabbitmq:z
ports:
- "127.0.0.1:25672:15672"
web:
build:
context: ..
dockerfile: Dockerfile
target: listenbrainz-dev
args:
GIT_COMMIT_SHA: HEAD
environment:
FLASK_APP: listenbrainz.webserver:create_web_app()
command: flask run -h 0.0.0.0 -p 80 --debug
image: web
volumes:
- web_home:/root
- ..:/code/listenbrainz:z
- ../frontend:/static
ports:
- "8100:80"
user: "${LB_DOCKER_USER:-root}:${LB_DOCKER_GROUP:-root}"
depends_on:
- redis
- lb_db
- rabbitmq
- couchdb
api_compat:
image: web
environment:
FLASK_APP: listenbrainz.webserver:create_api_compat_app()
command: flask run -h 0.0.0.0 -p 8101 --debug
ports:
- "8101:8101"
volumes:
- ..:/code/listenbrainz:z
user: "${LB_DOCKER_USER:-root}:${LB_DOCKER_GROUP:-root}"
depends_on:
- redis
- lb_db
- rabbitmq
timescale_writer:
image: web
command: python3 -m "listenbrainz.timescale_writer.timescale_writer"
volumes:
- ..:/code/listenbrainz:z
user: "${LB_DOCKER_USER:-root}:${LB_DOCKER_GROUP:-root}"
depends_on:
- redis
- lb_db
- rabbitmq
background_tasks:
image: web
command: python3 -m "listenbrainz.background.background_tasks"
volumes:
- ..:/code/listenbrainz:z
user: "${LB_DOCKER_USER:-root}:${LB_DOCKER_GROUP:-root}"
depends_on:
- redis
- lb_db
- rabbitmq
spotify_reader:
image: web
volumes:
- ..:/code/listenbrainz:z
command: python3 -m "listenbrainz.listens_importer.spotify"
user: "${LB_DOCKER_USER:-root}:${LB_DOCKER_GROUP:-root}"
depends_on:
- redis
- lb_db
- rabbitmq
lastfm_importer:
image: web
volumes:
- ..:/code/listenbrainz:z
command: python3 -m "listenbrainz.listens_importer.lastfm"
user: "${LB_DOCKER_USER:-root}:${LB_DOCKER_GROUP:-root}"
depends_on:
- redis
- rabbitmq
- lb_db
websockets:
image: web
volumes:
- ..:/code/listenbrainz:z
command: python manage.py run_websockets -h 0.0.0.0 -p 8102
ports:
- "8102:8102"
user: "${LB_DOCKER_USER:-root}:${LB_DOCKER_GROUP:-root}"
depends_on:
- redis
- lb_db
- rabbitmq
static_builder:
build:
context: ..
dockerfile: Dockerfile
target: listenbrainz-frontend-dev
command: npm run build:dev
user: "${LB_DOCKER_USER:-node}:${LB_DOCKER_GROUP:-node}"
volumes:
- ../frontend:/code/frontend:z
# Uncomment the following lines if you want to connect the LB network to a musicbrainz-docker network to access a MB replica
# TODO: re-comment these before merging this code
#networks:
# default:
# name: musicbrainz-docker_default
# external: true