-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
77 lines (72 loc) · 1.56 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
version: '3.9'
services:
postgres:
image: postgres:15-alpine
container_name: postgres
ports:
- 5432:5432
environment:
- POSTGRES_PASSWORD=postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 60s
timeout: 10s
retries: 3
start_period: 15s
volumes:
- ./.data/postgras:/var/lib/postgresql/data
nats:
container_name: nats-js
image: nats:2.9-alpine
ports:
- "4222:4222"
command: "-js --sd /data --http_port 8222"
volumes:
- ./.data/nats:/data
order-service:
build:
context: ./build
args:
SERVICE: order-svc
image: ghcr.io/ragul28/grpc-event-stream/order-svc
container_name: order-svc
ports:
- 8080:8080
environment:
- PORT=8080
- NATS_URL=nats://nats:4222
- DB_HOST=postgres
- DB_NAME=postgres
- DB_USER=postgres
- DB_PASSWORD=postgres
depends_on:
- postgres
- nats
payment-service:
build:
context: ./build
args:
SERVICE: payment-svc
image: ghcr.io/ragul28/grpc-event-stream/payment-svc
container_name: payment-svc
ports:
- 8081:8080
environment:
- PORT=8080
- NATS_URL=nats://nats:4222
depends_on:
- nats
gateway:
build:
context: ./build
args:
SERVICE: gateway
image: ghcr.io/ragul28/grpc-event-stream/gateway
container_name: gateway
ports:
- 8082:8080
environment:
PORT: 8080
ORDER_GRPC_ADDR: "order-service:8080"
depends_on:
- order-service