-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
123 lines (115 loc) · 2.72 KB
/
docker-compose.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
116
117
118
119
120
121
122
123
version: "3"
services:
sales-db:
image: mongo:latest
container_name: sales-db
restart: always
networks:
- sales-network
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=123456
ports:
- 27017:27017
- 28017:28017
auth-db:
image: postgres:11
container_name: auth-db
restart: always
networks:
- sales-network
environment:
- POSTGRES_DB=auth-db
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=123456
ports:
- 5432:5432
sales_rabbit:
image: rabbitmq:3-management
container_name: sales_rabbit
hostname: sales_rabbit
networks:
- sales-network
ports:
- 5672:5672
- 25676:25676
- 15672:15672
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
product-db:
image: postgres:11
container_name: product-db
restart: always
networks:
- sales-network
environment:
- POSTGRES_DB=product-db
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=123456
ports:
- 5433:5432
product-api:
build: './product-api'
container_name: product-api
depends_on:
- product-db
- sales_rabbit
networks:
- sales-network
environment:
- PORT=8081
- API_SECRET=YXV0aC1hcGktc2VjcmV0LWNvbnRhaW5lci0zNDcyMzAxNzYyODI4OTQxMDU2MTQ=
- DB_HOST=product-db
- DB_NAME=product-db
- DB_USER=admin
- DB_PASSWORD=123456
- DB_PORT=5432
- RABBIT_MQ_HOST=sales_rabbit
- RABBIT_MQ_PORT=5672
- RABBIT_MQ_USER=guest
- RABBIT_MQ_PASSWORD=guest
- SALES_HOST=sales-api
- SALES_PORT=8082
ports:
- 8081:8081
sales-api:
build: './sales-api'
container_name: sales-api
depends_on:
- sales-db
- sales_rabbit
- product-api
networks:
- sales-network
environment:
- PORT=8082
- API_SECRET=YXV0aC1hcGktc2VjcmV0LWNvbnRhaW5lci0zNDcyMzAxNzYyODI4OTQxMDU2MTQ=
- MONGO_DB_URL=mongodb://admin:123456@sales-db:27017
- RABBIT_MQ_URL=amqp://guest:guest@sales_rabbit:5672/
- PRODUCT_API_URL=http://product-api:8081/api/product
- NODE_ENV=container
ports:
- 8082:8082
auth-api:
build: './auth-api'
container_name: auth-api
depends_on:
- auth-db
- product-api
networks:
- sales-network
environment:
- PORT=8080
- API_SECRET=YXV0aC1hcGktc2VjcmV0LWNvbnRhaW5lci0zNDcyMzAxNzYyODI4OTQxMDU2MTQ=
- DB_HOST=auth-db
- DB_NAME=auth-db
- DB_USER=admin
- DB_PASSWORD=123456
- DB_PORT=5432
- NODE_ENV=container
ports:
- 8080:8080
networks:
sales-network:
driver: bridge