-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
182 lines (168 loc) · 3.85 KB
/
compose.yaml
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
services:
front:
build: ./front/
ports:
- "3000:3000"
# depends_on:
# - consul
# - api-gateway
# - likes
# - post
# - profile
# - auth
# - friend
# - feed
# - logging
hazelcast:
image: hazelcast/hazelcast
pull_policy: missing
depends_on:
management-center:
condition: service_started
management-center:
image: hazelcast/management-center:5.3.3
pull_policy: missing
ports:
- "7000:8080"
environment:
- MC_DEFAULT_CLUSTER=dev
- MC_DEFAULT_CLUSTER_MEMBERS=hazelcast
consul:
build: ./consul
ports:
- "8500:8500"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8500/v1/kv/hazelcast/map-name"]
start_period: 30s
start_interval: 1s
timeout: 1s
gateway-consul:
build: ./gateway-consul
ports:
- "8501:8500"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8500/v1/status/leader"]
start_period: 30s
start_interval: 1s
timeout: 1s
likes:
build: ./like-service/
depends_on:
likes_db:
condition: service_started
consul:
condition: service_healthy
ports:
- "8079:8079"
post:
build: ./post-service/
depends_on:
consul:
condition: service_healthy
ports:
- "8080:8080"
profile:
build: ./profile-service/
depends_on:
consul:
condition: service_healthy
ports:
- "8081:8081"
auth:
build: ./auth-service/
depends_on:
auth_db:
condition: service_started
consul:
condition: service_healthy
ports:
- "8082:8082"
friend:
build: friend-service/
depends_on:
friend_db:
condition: service_started
consul:
condition: service_healthy
ports:
- "8083:8083"
api-gateway:
build: ./api-gateway/
depends_on:
consul:
condition: service_healthy
gateway-consul:
condition: service_healthy
ports:
- "8084:8084"
feed:
build: ./feed-service/
depends_on:
consul:
condition: service_healthy
ports:
- "8085:8085"
logging:
build: ./logging-service/
depends_on:
consul:
condition: service_healthy
ports:
- "8086:8086"
likes_db:
image: postgres:latest
pull_policy: missing
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root_pass
POSTGRES_DB: likes_db
volumes:
- ./like-service/postgres-db-init:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
profile_db:
image: mongo:latest
hostname: profile_db
pull_policy: missing
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root_pass
MONGO_INITDB_DATABASE: profile_db
volumes:
- ./profile-service/mongo-db-init.js:/docker-entrypoint-initdb.d/mongo-db-init.js:ro
ports:
- "27018:27017"
post_db:
image: mongo:latest
hostname: post_db
pull_policy: missing
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root_pass
MONGO_INITDB_DATABASE: post_db
volumes:
- ./post-service/mongo-db-init.js:/docker-entrypoint-initdb.d/mongo-db-init.js:ro
ports:
- "27017:27017"
auth_db:
image: postgres:latest
pull_policy: missing
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root_pass
POSTGRES_DB: auth_db
volumes:
- ./auth-service/postgres-db-init:/docker-entrypoint-initdb.d
ports:
- "5434:5432"
friend_db:
image: postgres:latest
pull_policy: missing
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root_pass
POSTGRES_DB: friend_db
volumes:
- ./friend-service/postgres-db-init:/docker-entrypoint-initdb.d
ports:
- "5435:5432"