-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
168 lines (168 loc) · 3.56 KB
/
Copy pathdocker-compose.yml
File metadata and controls
168 lines (168 loc) · 3.56 KB
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
version: '3'
networks:
app_net:
driver: bridge
user_net:
driver: bridge
route_net:
driver: bridge
post_net:
driver: bridge
offer_net:
driver: bridge
utility_net:
driver: bridge
services:
users:
build: ./users
ports:
- "3000:3000"
environment:
DB_NAME: monitor_users
DB_HOST: users_db
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
FLASK_APP: ./src/main.py
depends_on:
users_db:
condition: service_healthy
networks:
- app_net
- user_net
users_db:
image: postgres
environment:
POSTGRES_DB: monitor_users
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 5s
retries: 5
networks:
- user_net
routes:
build: ./routes
ports:
- "3002:3000"
environment:
DB_NAME: monitor_routes
DB_HOST: routes_db
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
USERS_PATH: "http://users:3000"
FLASK_APP: ./src/main.py
depends_on:
routes_db:
condition: service_healthy
networks:
- app_net
- route_net
routes_db:
image: postgres
environment:
POSTGRES_DB: monitor_routes
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 5s
retries: 5
networks:
- route_net
posts:
build: ./posts
ports:
- "3001:3000"
environment:
DB_NAME: monitor_posts
DB_HOST: posts_db
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
USERS_PATH: "http://users:3000"
FLASK_APP: ./src/main.py
depends_on:
posts_db:
condition: service_healthy
networks:
- app_net
- post_net
posts_db:
image: postgres
environment:
POSTGRES_DB: monitor_posts
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 5s
retries: 5
networks:
- post_net
offers:
build: ./offers
ports:
- "3003:3000"
environment:
DB_NAME: monitor_offers
DB_HOST: offers_db
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
USERS_PATH: "http://users:3000"
FLASK_APP: ./src/main.py
depends_on:
offers_db:
condition: service_healthy
networks:
- app_net
- offer_net
offers_db:
image: postgres
environment:
POSTGRES_DB: monitor_offers
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 5s
retries: 5
networks:
- offer_net
utilities:
build: ./utility
ports:
- "3011:8000"
environment:
DB_NAME: monitor_utilities
DB_HOST: utilities_db
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
USERS_PATH: "http://users:3000"
depends_on:
utilities_db:
condition: service_healthy
networks:
- app_net
- utility_net
utilities_db:
image: postgres
environment:
POSTGRES_DB: monitor_utilities
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 2s
timeout: 5s
retries: 5
networks:
- utility_net