-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
82 lines (74 loc) · 1.62 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
version: '3.8'
services:
product-service:
build:
context: ./services/product
dockerfile: Dockerfile
environment:
- NATS_URL=nats://nats:4222
ports:
- "50051:50051"
volumes:
- ./configs/product-config.yaml:/app/config.yaml
depends_on:
- product-db
- nats
order-service:
build:
context: ./services/order
dockerfile: Dockerfile
environment:
- NATS_URL=nats://nats:4222
ports:
- "50052:50052"
volumes:
- ./configs/order-config.yaml:/app/config.yaml
depends_on:
- order-db
- nats
inventory-service:
build:
context: ./services/inventory
dockerfile: Dockerfile
environment:
- NATS_URL=nats://nats:4222
ports:
- "50053:50053"
volumes:
- ./configs/inventory-config.yaml:/app/config.yaml
depends_on:
- inventory-redis
- nats
product-db:
image: postgres:16-alpine
environment:
POSTGRES_USER: product_user
POSTGRES_PASSWORD: product_password
POSTGRES_DB: product_db
ports:
- "5432:5432"
volumes:
- product-db-data:/var/lib/postgresql/data
order-db:
image: mongo:7.0
environment:
MONGO_INITDB_ROOT_USERNAME: order_user
MONGO_INITDB_ROOT_PASSWORD: order_password
ports:
- "27017:27017"
volumes:
- order-db-data:/data/db
inventory-redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- inventory-redis-data:/data
nats:
image: nats:2.10-alpine
ports:
- "4222:4222"
volumes:
product-db-data:
order-db-data:
inventory-redis-data: