-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
148 lines (138 loc) · 4.14 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
version: "3.7"
services:
product-api:
container_name: "product-api-container"
image: node:10.16-slim
entrypoint: ./.docker/entrypoint.sh
working_dir: /backend/src/
volumes:
- ./backend-product:/backend/src/
depends_on:
- product-postgres
ports:
- "3000:3000"
environment:
- DB_URI=product-postgres
restart: always
checkout-api:
container_name: "checkout-api-container"
image: node:10.16-slim
entrypoint: ./.docker/entrypoint.sh
working_dir: /backend/src/
volumes:
- ./backend-checkout:/backend/src/
depends_on:
- rabbitmq-queue
ports:
- "3010:3000"
environment:
- PRODUCT_URI=product-api:3000
- AUTH_URI=auth-api:3000
- RABBITMQ_URI=rabbitmq-queue
restart: always
auth-api:
container_name: "auth-api-container"
image: node:10.16-slim
working_dir: /backend/src/
entrypoint: ./.docker/entrypoint.sh
volumes:
- ./backend-auth:/backend/src/
depends_on:
- auth-postgres
ports:
- "3020:3000"
environment:
- DB_URI=auth-postgres
restart: always
order-api:
container_name: "order-api-container"
image: node:10.16-slim
entrypoint: ./.docker/entrypoint.sh
working_dir: /backend/src/
volumes:
- ./backend-order:/backend/src/
depends_on:
- order-postgres
- rabbitmq-queue
ports:
- "3030:3000"
environment:
- DB_URI=order-postgres
- AUTH_URI=auth-api:3000
- RABBITMQ_URI=rabbitmq-queue
restart: always
payment-api:
container_name: "payment-api-container"
image: node:10.16-slim
entrypoint: ./.docker/entrypoint.sh
working_dir: /backend/src/
volumes:
- ./backend-payment:/backend/src/
depends_on:
- rabbitmq-queue
ports:
- "3040:3000"
environment:
- AUTH_URI=auth-api:3000
- RABBITMQ_URI=rabbitmq-queue
restart: always
product-postgres:
container_name: product-postgres-container
image: library/postgres:9.6-alpine
ports:
- "5431:5432"
volumes:
- ./backend-product/docker/postgres/data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root@123
- POSTGRES_DB=database
restart: always
auth-postgres:
container_name: auth-postgres-container
image: library/postgres:9.6-alpine
ports:
- "5434:5432"
volumes:
- ./backend-auth/docker/postgres/data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root@123
- POSTGRES_DB=database
restart: always
order-postgres:
container_name: order-postgres-container
image: library/postgres:9.6-alpine
ports:
- "5435:5432"
volumes:
- ./backend-order/docker/postgres/data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root@123
- POSTGRES_DB=database
restart: always
nginx:
container_name: nginx-container
image: nginx:latest
ports:
- "8080:8080"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- product-api
- checkout-api
- auth-api
- order-api
- payment-api
rabbitmq-queue:
container_name: "rabbitmq-container"
image: rabbitmq:3-management
environment:
RABBITMQ_DEFAULT_USER: "rabbitmq"
RABBITMQ_DEFAULT_PASS: "rabbitmq"
RABBITMQ_DEFAULT_VHOST: "/"
ports:
- "15672:15672"
- "5672:5672"
restart: always