forked from kookmin-sw/cap-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
integration-docker-compose.yml
225 lines (209 loc) · 4.84 KB
/
integration-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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
version: '3'
services:
# common
redis:
container_name: redis
hostname: redis
image: redis:latest
ports:
- "6379:6379"
restart: always
environment:
TZ: "Asia/Seoul"
networks:
- auth
- composite
- debate
- magician
- community
# magician
mongo-magician:
image: mongo
container_name: mongo-magician
restart: always
ports:
- "27017:27017"
volumes:
- ./mongodb:/data/db
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=1234
- MONGO_INITDB_DATABASE=chat_db
networks:
- magician
application_magician:
build: magician/.
depends_on:
- mongo-magician
restart: always
container_name: magician
ports:
- "8000:8000"
environment:
OPENAI_KEY: ""
MAGICIAN_MONGO_USERNAME: root
MAGICIAN_MONGO_PASSWORD: 1234
MAGICIAN_MONGO_PORT: 27017
MAGICIAN_MONGO_HOST: mongo-magician
MAGICIAN_REDIS_PORT: 6379
MAGICIAN_REDIS_HOST: redis
networks:
- magician
- composite
# auth
postgres-auth:
container_name: postgres-auth
hostname: postgres-auth
image: postgres:latest
ports:
- "5432:5432"
restart: always
environment:
POSTGRES_DB: auth
POSTGRES_USER: auth
POSTGRES_PASSWORD: 1234
TZ: "Asia/Seoul"
volumes:
- ./auth-service/postgres-data:/var/lib/postgresql/data
networks:
- auth
application-auth:
container_name: auth-service
build: auth-service/.
ports:
- "8080:8080"
restart: always
environment:
TZ: "Asia/Seoul"
AUTH_POSTGRES_HOST: postgres-auth
AUTH_POSTGRES_PORT: 5432
AUTH_POSTGRES_USER: auth
AUTH_POSTGRES_PASSWORD: 1234
AUTH_REDIS_PORT: 6379
AUTH_REDIS_HOST: redis
JWT_SECRET: "test_JWT_secret"
ACCESS_EXPIRATION: 3600000
REFRESH_EXPIRATION: 86400000
GOOGLE_CLIENT_ID: ""
GOOGLE_CLIENT_SECRET: ""
AWS_ACCESS_KEY: ""
AWS_SECRET_KEY: ""
AWS_S3_BUCKET: "jumunseo-photo"
depends_on:
- redis
- postgres-auth
networks:
- auth
- composite
# composite
application-composite:
container_name: composite-service
build: composite-service/.
ports:
- "8081:8081"
restart: always
environment:
TZ: "Asia/Seoul"
JWT_SECRET: "test_JWT_secret"
COMPOSITE_REDIS_PORT: 6379
COMPOSITE_REDIS_HOST: redis
# at Docker-Compose
ADDRESS_AUTH: "http://auth-service:8080"
ADDRESS_DEBATE: "http://debate-service:8082"
ADDRESS_MAGICIAN: "http://magician:8000"
ADDRESS_COMMUNITY: "http://community-service:8083"
AWS_ACCESS_KEY: ""
AWS_SECRET_KEY: ""
AWS_S3_BUCKET: ""
depends_on:
- redis
networks:
- composite
# debate
postgres-debate:
container_name: postgres-debate
hostname: postgres-debate
image: postgres:latest
ports:
- "5433:5433"
restart: always
environment:
POSTGRES_DB: debate
POSTGRES_USER: debate
POSTGRES_PASSWORD: 1234
TZ: "Asia/Seoul"
volumes:
- ./debate/postgres-data:/var/lib/postgresql/data
networks:
- debate
application-debate:
container_name: debate-service
build: debate/.
ports:
- "8082:8082"
restart: always
environment:
TZ: "Asia/Seoul"
DEBATE_POSTGRES_HOST: postgres-debate
DEBATE_POSTGRES_PORT: 5433
DEBATE_POSTGRES_USER: debate
DEBATE_POSTGRES_PASSWORD: 1234
DEBATE_REDIS_PORT: 6379
DEBATE_REDIS_HOST: redis
OPENAI_KEY: ""
depends_on:
- postgres-debate
- redis
networks:
- debate
- composite
application-community:
container_name: community-service
build: community/.
ports:
- "8083:8083"
restart: always
environment:
TZ: "Asia/Seoul"
COMMUNITY_REDIS_PORT: 6379
COMMUNITY_REDIS_HOST: redis
COMMUNITY_POSTGRES_HOST: postgres-community
COMMUNITY_POSTGRES_PORT: 5434
COMMUNITY_POSTGRES_USER: community
COMMUNITY_POSTGRES_PASSWORD: 1234
AWS_ACCESS_KEY: ""
AWS_SECRET_KEY: ""
AWS_S3_BUCKET: "jumunseo-photo"
depends_on:
- postgres-community
- redis
networks:
- community
- composite
postgres-community:
container_name: postgres-community
hostname: postgres-community
image: postgres:latest
ports:
- "5434:5434"
restart: always
environment:
POSTGRES_DB: community
POSTGRES_USER: community
POSTGRES_PASSWORD: 1234
TZ: "Asia/Seoul"
volumes:
- ./community/postgres-data:/var/lib/postgresql/data
networks:
- community
networks:
magician:
driver: bridge
auth:
driver: bridge
composite:
driver: bridge
debate:
driver: bridge
community:
driver: bridge