-
Notifications
You must be signed in to change notification settings - Fork 46
/
docker-compose.yml
70 lines (65 loc) · 1.67 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
version: '3'
services:
monolith:
build: .
entrypoint: ["./docker/entrypoint.sh", "./cmd/monolith/main.go"]
ports:
- "8090:8080"
environment:
- SHOP_MONOLITH_BIND_ADDR=:8080
volumes:
- ./cmd:$GO_PROJECT_DIR/cmd
- ./pkg:$GO_PROJECT_DIR/pkg
orders:
build: .
entrypoint: ["./docker/entrypoint.sh", "./cmd/microservices/orders/main.go"]
ports:
- "8070:8080"
environment:
- SHOP_ORDERS_SERVICE_BIND_ADDR=:8080
- SHOP_RABBITMQ_ADDR=rabbitmq:5672
- SHOP_RABBITMQ_ORDERS_TO_PAY_QUEUE=orders-to-pay
- SHOP_SHOP_SERVICE_ADDR=http://shop:8080
volumes:
- ./cmd:$GO_PROJECT_DIR/cmd
- ./pkg:$GO_PROJECT_DIR/pkg
depends_on:
- rabbitmq
payments:
build: .
entrypoint: ["./docker/entrypoint.sh", "./cmd/microservices/payments/main.go"]
volumes:
- ./cmd:$GO_PROJECT_DIR/cmd
- ./pkg:$GO_PROJECT_DIR/pkg
environment:
- SHOP_RABBITMQ_ADDR=rabbitmq:5672
- SHOP_RABBITMQ_ORDERS_TO_PAY_QUEUE=orders-to-pay
- SHOP_ORDERS_SERVICE_ADDR=http://orders:8080
depends_on:
- rabbitmq
shop:
build: .
entrypoint: ["./docker/entrypoint.sh", "./cmd/microservices/shop/main.go"]
volumes:
- ./cmd:$GO_PROJECT_DIR/cmd
- ./pkg:$GO_PROJECT_DIR/pkg
environment:
- SHOP_SHOP_SERVICE_BIND_ADDR=:8080
ports:
- "8071:8080"
depends_on:
- rabbitmq
rabbitmq:
image: rabbitmq:3.7-management
ports:
- "15672:15672"
tests:
build: .
entrypoint: ["sleep", "infinity"]
depends_on:
- shop
- payments
- orders
- monolith
volumes:
- ./tests:$GO_PROJECT_DIR/tests