-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yaml
115 lines (109 loc) · 2.5 KB
/
docker-compose.dev.yaml
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
version: '3'
services:
kafka:
environment:
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
payment:
container_name: payment-api
image: payment
build:
context: .
dockerfile: Dockerfile
target: payment
restart: always
environment:
- KAFKA_ID=payment-api
- KAFKA_BROKER=kafka:9092
- KAFKA_RETRY_TIME=${KAFKA_RETRY_TIME}
- KAFKA_RETRY_TIMES=${KAFKA_RETRY_TIMES}
command: bash -c "npx tsx payment/server.ts"
depends_on:
- kafka
networks:
- app-net
order:
container_name: order-api
image: order
build:
context: .
dockerfile: Dockerfile
target: order
restart: always
environment:
- APP_PORT=3003
- KAFKA_ID=order-api
- KAFKA_BROKER=kafka:9092
- KAFKA_RETRY_TIME=${KAFKA_RETRY_TIME}
- KAFKA_RETRY_TIMES=${KAFKA_RETRY_TIMES}
ports:
- '3003:3003'
command: bash -c "npx tsx order/server.ts"
depends_on:
- kafka
networks:
- app-net
product:
container_name: product-api
image: product
build:
context: .
dockerfile: Dockerfile
target: product
restart: always
environment:
- APP_PORT=3002
- KAFKA_ID=product-api
- KAFKA_BROKER=kafka:9092
- KAFKA_RETRY_TIME=${KAFKA_RETRY_TIME}
- KAFKA_RETRY_TIMES=${KAFKA_RETRY_TIMES}
ports:
- '3002:3002'
command: bash -c "npx tsx product/server.ts"
depends_on:
- kafka
networks:
- app-net
customer:
container_name: customer-api
image: customer
build:
context: .
dockerfile: Dockerfile
target: customer
restart: always
environment:
- APP_PORT=3001
- KAFKA_ID=customer-api
- KAFKA_BROKER=kafka:9092
- KAFKA_RETRY_TIME=${KAFKA_RETRY_TIME}
- KAFKA_RETRY_TIMES=${KAFKA_RETRY_TIMES}
ports:
- '3001:3001'
command: bash -c "npx tsx customer/server.ts"
depends_on:
- kafka
networks:
- app-net
gateway:
container_name: gateway-api
image: gateway
build:
context: .
dockerfile: Dockerfile
target: gateway
restart: always
environment:
- APP_PORT=3000
- GATEWAY_URL=${GATEWAY_URL}
- CUSTOMER_URL=http://customer:3001
- PRODUCT_URL=http://product:3002
- ORDER_URL=http://order:3003
ports:
- '3000:3000'
command: bash -c "npx tsx gateway/server.ts"
depends_on:
- customer
- product
- order
networks:
- app-net