-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
205 lines (193 loc) · 4.9 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
195
196
197
198
199
200
201
202
203
204
205
version: '3.9'
services:
monolith:
profiles:
- monolith
build:
context: .
dockerfile: monolith.Dockerfile
container_name: monolith
ports:
- "8080:8080"
environment:
LOG_LEVEL: DEBUG
SPONSORS_DATABASE_HOST: postgres-sponsors
SPONSORS_DATABASE_PORT: 5432
SPONSORS_DATABASE_USERNAME: sponsors_user
SPONSORS_DATABASE_PASSWORD: sponsors_pass
SPRING_DATA_MONGODB_HOST: mongodb
SPRING_DATA_MONGODB_PORT: 27017
SPRING_DATA_MONGODB_USERNAME: initiatives_user
SPRING_DATA_MONGODB_PASSWORD: initiatives_pass
MEDIA_DATABASE_HOST: minio
MEDIA_DATABASE_PORT: 9000
MEDIA_DATABASE_USERNAME: media_user
MEDIA_DATABASE_PASSWORD: media_pass
MEDIA_METADATA_DATABASE_HOST: postgres-media
MEDIA_METADATA_DATABASE_PORT: 5432
MEDIA_METADATA_DATASOURCE_USERNAME: media_user
MEDIA_METADATA_DATASOURCE_PASSWORD: media_pass
depends_on:
- postgres-sponsors
- mongodb
- minio
- postgres-media
networks:
- opora-network
apigateway-service:
profiles:
- microservices
build:
context: .
dockerfile: apigateway-service.Dockerfile
container_name: apigateway-service
ports:
- "8090:8080"
environment:
LOG_LEVEL: DEBUG
SERVER_PORT: 8080
INITIATIVES_SERVICE_HOST: initiatives-service
INITIATIVES_SERVICE_PORT: 8080
MEDIA_SERVICE_HOST: media-service
MEDIA_SERVICE_PORT: 8080
SPONSORS_SERVICE_HOST: sponsors-service
SPONSORS_SERVICE_PORT: 8080
depends_on:
- initiatives-service
- media-service
- sponsors-service
networks:
- opora-network
initiatives-service:
profiles:
- microservices
build:
context: .
dockerfile: initiatives-service.Dockerfile
container_name: initiatives-service
ports:
- "8091:8080"
environment:
LOG_LEVEL: DEBUG
SERVER_PORT: 8080
SPRING_DATA_MONGODB_HOST: mongodb
SPRING_DATA_MONGODB_PORT: 27017
SPRING_DATA_MONGODB_USERNAME: initiatives_user
SPRING_DATA_MONGODB_PASSWORD: initiatives_pass
depends_on:
- mongodb
networks:
- opora-network
media-service:
profiles:
- microservices
build:
context: .
dockerfile: media-service.Dockerfile
container_name: media-service
ports:
- "8092:8080"
environment:
LOG_LEVEL: DEBUG
SERVER_PORT: 8080
MEDIA_DATABASE_HOST: minio
MEDIA_DATABASE_PORT: 9000
MEDIA_DATABASE_USERNAME: media_user
MEDIA_DATABASE_PASSWORD: media_pass
MEDIA_METADATA_DATABASE_HOST: postgres-media
MEDIA_METADATA_DATABASE_PORT: 5432
SPRING_DATASOURCE_USERNAME: media_user
SPRING_DATASOURCE_PASSWORD: media_pass
depends_on:
- minio
- postgres-media
networks:
- opora-network
sponsors-service:
profiles:
- microservices
build:
context: .
dockerfile: sponsors-service.Dockerfile
container_name: sponsors-service
ports:
- "8093:8080"
environment:
LOG_LEVEL: DEBUG
SERVER_PORT: 8080
SPONSORS_DATABASE_HOST: postgres-sponsors
SPONSORS_DATABASE_PORT: 5432
SPRING_DATASOURCE_USERNAME: sponsors_user
SPRING_DATASOURCE_PASSWORD: sponsors_pass
depends_on:
- postgres-sponsors
networks:
- opora-network
postgres-sponsors:
image: postgres
container_name: postgres-sponsors
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: sponsors_pass
POSTGRES_USER: sponsors_user
POSTGRES_DB: sponsors
volumes:
- sponsors-db:/var/lib/postgresql/data
networks:
- opora-network
postgres-media:
image: postgres
container_name: postgres-media
restart: always
ports:
- "5433:5432"
environment:
POSTGRES_PASSWORD: media_pass
POSTGRES_USER: media_user
POSTGRES_DB: media_metadata
volumes:
- media-metadata-db:/var/lib/postgresql/data
networks:
- opora-network
mongodb:
image: mongo
container_name: mongodb
restart: always
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: initiatives_user
MONGO_INITDB_ROOT_PASSWORD: initiatives_pass
MONGO_INITDB_DATABASE: initiatives
volumes:
- initiatives-db:/data/db
networks:
- opora-network
minio:
image: quay.io/minio/minio
container_name: minio
restart: always
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: media_user
MINIO_ROOT_PASSWORD: media_pass
MINIO_ADDRESS: ':9000'
MINIO_CONSOLE_ADDRESS: ':9001'
MINIO_DEFAULT_BUCKETS: media
command: server /data
volumes:
- media-db:/data
networks:
- opora-network
networks:
opora-network:
driver: bridge
volumes:
sponsors-db:
initiatives-db:
media-db:
media-metadata-db: