-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
194 lines (178 loc) · 5.17 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
version: "3"
services:
etcd:
image: quay.io/coreos/etcd:latest
restart: always
ports:
- "2379:2379"
volumes:
- /tmp/etcd-data:/etcd-data
environment:
- ETCD_NAME=my-etcd
- ETCD_DATA_DIR=/etcd-data
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
- ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379
- ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
- ETCD_INITIAL_ADVERTISE_PEER_URLS=http://0.0.0.0:2380
- ETCD_INITIAL_CLUSTER=my-etcd=http://0.0.0.0:2380
- ETCD_INITIAL_CLUSTER_TOKEN=my-etcd-token
- ETCD_INITIAL_CLUSTER_STATE=new
- ETCD_AUTO_COMPACTION_RETENTION=1
- ETCD_CORS=*
postgres-user:
image: postgres:latest
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=user
ports:
- "5432:5432"
postgres-video:
image: postgres:latest
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=video
ports:
- "5433:5432"
postgres-subscription:
image: postgres:latest
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=subscription
ports:
- "5434:5432"
user-service:
build:
context: user
dockerfile: Dockerfile
image: stashvala/streaming_app:users-api
#image: users-api # used for local building
environment:
- KUMULUZEE_DATASOURCES0_CONNECTIONURL=jdbc:postgresql://postgres-user:5432/user
- KUMULUZEE_CONFIG_ETCD_HOSTS=http://etcd:2379
- KUMULUZEE_DISCOVERY_ETCD_HOSTS=http://etcd:2379
ports:
- "8080:8080"
depends_on:
- postgres-user
video-service:
build:
context: video
dockerfile: Dockerfile
image: stashvala/streaming_app:videos-api
#image: videos-api # used for local building
environment:
- KUMULUZEE_DATASOURCES0_CONNECTIONURL=jdbc:postgresql://postgres-video:5432/video
- KUMULUZEE_CONFIG_ETCD_HOSTS=http://etcd:2379
- KUMULUZEE_DISCOVERY_ETCD_HOSTS=http://etcd:2379
- KUMULUZEE_SERVER_BASE-URL=http://video-service:8081
ports:
- "8082:8082"
depends_on:
- postgres-video
demo-service:
build:
context: demo
dockerfile: Dockerfile
image: demo-api
ports:
- "8081:8081"
config-service:
build:
context: config
dockerfile: Dockerfile
image: stashvala/streaming_app:config
ports:
- "8083:8083"
subs-service:
build:
context: subscription
dockerfile: Dockerfile
image: stashvala/streaming_app:subscriptions-api
ports:
- "8084:8084"
environment:
- KUMULUZEE_DATASOURCES0_CONNECTIONURL=jdbc:postgresql://postgres-subscription:5432/subscription
- KUMULUZEE_CONFIG_ETCD_HOSTS=http://etcd:2379
- KUMULUZEE_DISCOVERY_ETCD_HOSTS=http://etcd:2379
depends_on:
- postgres-subscription
postgres-rating:
image: postgres:latest
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=rating
ports:
- "5435:5432"
ratings-service:
build:
context: rating
dockerfile: Dockerfile
image: stashvala/streaming_app:ratings-api
ports:
- "8085:8085"
environment:
- KUMULUZEE_DATASOURCES0_CONNECTIONURL=jdbc:postgresql://postgres-rating:5432/rating
- KUMULUZEE_CONFIG_ETCD_HOSTS=http://etcd:2379
- KUMULUZEE_DISCOVERY_ETCD_HOSTS=http://etcd:2379
depends_on:
- postgres-rating
recommendations-service:
build:
context: recommendation
dockerfile: Dockerfile
image: stashvala/streaming_app:recommendations-api
ports:
- "8086:8086"
environment:
- KUMULUZEE_CONFIG_ETCD_HOSTS=http://etcd:2379
- KUMULUZEE_DISCOVERY_ETCD_HOSTS=http://etcd:2379
postgres-comment:
image: postgres:latest
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=comment
ports:
- "5436:5432"
comments-service:
build:
context: comment
dockerfile: Dockerfile
image: stashvala/streaming_app:comments-api
ports:
- "8087:8087"
environment:
- KUMULUZEE_DATASOURCES0_CONNECTIONURL=jdbc:postgresql://postgres-comment:5432/comment
- KUMULUZEE_CONFIG_ETCD_HOSTS=http://etcd:2379
- KUMULUZEE_DISCOVERY_ETCD_HOSTS=http://etcd:2379
depends_on:
- postgres-comment
uploaders-service:
build:
context: uploader
dockerfile: Dockerfile
image: stashvala/streaming_app:uploaders-api
ports:
- "8088:8088"
environment:
- KUMULUZEE_DATASOURCES0_CONNECTIONURL=jdbc:postgresql://postgres-uploader:5432/uploader
- KUMULUZEE_CONFIG_ETCD_HOSTS=http://etcd:2379
- KUMULUZEE_DISCOVERY_ETCD_HOSTS=http://etcd:2379
depends_on:
- postgres-uploader
postgres-uploader:
image: postgres:latest
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=uploader
ports:
- "5437:5432"
player-service:
build:
context: player
dockerfile: Dockerfile
image: stashvala/streaming_app:player-api
ports:
- "8089:8089"
environment:
- KUMULUZEE_CONFIG_ETCD_HOSTS=http://etcd:2379
- KUMULUZEE_DISCOVERY_ETCD_HOSTS=http://etcd:2379