-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (72 loc) · 1.74 KB
/
Copy pathdocker-compose.yml
File metadata and controls
79 lines (72 loc) · 1.74 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
version: '3.8'
services:
api-gateway:
build: ./api-gateway
ports:
- "5003:5003"
environment:
- FLASK_APP=run.py
- FLASK_ENV=development
- CUSTOMER_SERVICE_URL=http://customer-service:5001
- SALES_SERVICE_URL=http://sales-service:5002
- AUTH_SERVICE_URL=http://auth-service:5000
depends_on:
- customer-service
- sales-service
- auth-service
customer-service:
build: ./customer-service
ports:
- "5001:5001"
environment:
- FLASK_APP=run.py
- FLASK_ENV=development
- MONGODB_URL=mongodb://mongodb:27017/customer-db
- AUTH_SERVICE_URL=http://auth-service:5000/api/auth/user-role
depends_on:
- mongodb
sales-service:
build: ./sales-service
ports:
- "5002:5002"
environment:
- FLASK_APP=run.py
- FLASK_ENV=development
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/salesdb
depends_on:
- postgres
auth-service:
build: ./auth-service
ports:
- "5000:5000"
environment:
- FLASK_APP=run.py
- FLASK_ENV=development
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/userdb
- JWT_SECRET=jwt_secret_key
depends_on:
- postgres
mongodb:
image: mongo:latest
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
postgres:
image: postgres:13
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
mongodb_data:
postgres_data: