-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
120 lines (112 loc) · 3.75 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
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
services:
sales-db:
image: mongo:latest
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:latest
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
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
ports:
- 5672:5672
- 25676:25676
- 15672:15672
product-db:
image: postgres:latest
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:
- API_SECRET=QW1hem9uIEVsYXN0aWMgQ29udGFpbmVyIFNlcnZpY2UgKEVDUykgaXMgYSBmdWxseTY5IG1hbmFnZWQgY29udGFpbmVyIG9yY2hlc3RyYXRpb24gc2VydmljZSB0aGF0IHNpbXBsaWZpZXMgeW91ciBkZXBsb3ltZW50LCBtYW5hZ2VtZW50LCBhbmQgc2NhbGluZyBvZiBjb250YWluZXJpemVkIGFwcGxpY2F0aW9ucy4gV2hldGhlciB5b3UgYXJlIG5ldyB0byBBbWF6b24gRUNTIG9yIHlvdSBhbHJlYWR5IGhhdmUgYSB1c2UgY2FzZSBpbiBtaW5kLCBjaG9vc2UgeW91ciBvd24gcGF0aCBhbmQgZm9sbG93IHRoZSBjdXJhdGVkIGxlYXJuaW5nIHN0ZXBzIHRvIGdldCBzdGFydGVkLg==
- PORT=8081
- 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:
- API_SECRET=QW1hem9uIEVsYXN0aWMgQ29udGFpbmVyIFNlcnZpY2UgKEVDUykgaXMgYSBmdWxseTY5IG1hbmFnZWQgY29udGFpbmVyIG9yY2hlc3RyYXRpb24gc2VydmljZSB0aGF0IHNpbXBsaWZpZXMgeW91ciBkZXBsb3ltZW50LCBtYW5hZ2VtZW50LCBhbmQgc2NhbGluZyBvZiBjb250YWluZXJpemVkIGFwcGxpY2F0aW9ucy4gV2hldGhlciB5b3UgYXJlIG5ldyB0byBBbWF6b24gRUNTIG9yIHlvdSBhbHJlYWR5IGhhdmUgYSB1c2UgY2FzZSBpbiBtaW5kLCBjaG9vc2UgeW91ciBvd24gcGF0aCBhbmQgZm9sbG93IHRoZSBjdXJhdGVkIGxlYXJuaW5nIHN0ZXBzIHRvIGdldCBzdGFydGVkLg==
- PORT=8082
- 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
networks:
- sales-network
environment:
- API_SECRET=QW1hem9uIEVsYXN0aWMgQ29udGFpbmVyIFNlcnZpY2UgKEVDUykgaXMgYSBmdWxseTY5IG1hbmFnZWQgY29udGFpbmVyIG9yY2hlc3RyYXRpb24gc2VydmljZSB0aGF0IHNpbXBsaWZpZXMgeW91ciBkZXBsb3ltZW50LCBtYW5hZ2VtZW50LCBhbmQgc2NhbGluZyBvZiBjb250YWluZXJpemVkIGFwcGxpY2F0aW9ucy4gV2hldGhlciB5b3UgYXJlIG5ldyB0byBBbWF6b24gRUNTIG9yIHlvdSBhbHJlYWR5IGhhdmUgYSB1c2UgY2FzZSBpbiBtaW5kLCBjaG9vc2UgeW91ciBvd24gcGF0aCBhbmQgZm9sbG93IHRoZSBjdXJhdGVkIGxlYXJuaW5nIHN0ZXBzIHRvIGdldCBzdGFydGVkLg==
- PORT=8080
- 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