-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
180 lines (173 loc) · 4.38 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
version: "3"
services:
###############################################
## PREFERENCE-SERVICE
###############################################
preference-db:
image: postgres
container_name: preference-db
environment:
POSTGRES_DB: preference
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- ./pgdata-preference:/var/lib/postgresql/data
ports:
- "${PREFERENCE_DB_PORT}:5432"
preference-service:
build: ./preference-service
command: npm run start:dev
container_name: preference
environment:
- CORE_HOST
- CORE_PORT
- CORE_DB_HOST
- CORE_DB_PORT
- NOTIFICATION_HOST
- NOTIFICATION_PORT
- NOTIFICATION_DB_HOST
- NOTIFICATION_DB_PORT
- PREFERENCE_HOST
- PREFERENCE_PORT
- PREFERENCE_DB_HOST
- PREFERENCE_DB_PORT
- ORDER_HOST
- ORDER_PORT
- ORDER_DB_HOST
- ORDER_DB_PORT
ports:
- "${PREFERENCE_PORT}:8081"
volumes:
- ./preference-service:/app
- /app/node_modules
depends_on:
- preference-db
###############################################
## ORDER-SERVICE
###############################################
order-db:
image: postgres
container_name: order-db
environment:
POSTGRES_DB: order
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- ./pgdata-order:/var/lib/postgresql/data
ports:
- "${ORDER_DB_PORT}:5432"
order-service:
build: ./order-service
command: npm run start:dev
container_name: order
environment:
- CORE_HOST
- CORE_PORT
- CORE_DB_HOST
- CORE_DB_PORT
- NOTIFICATION_HOST
- NOTIFICATION_PORT
- NOTIFICATION_DB_HOST
- NOTIFICATION_DB_PORT
- PREFERENCE_HOST
- PREFERENCE_PORT
- PREFERENCE_DB_HOST
- PREFERENCE_DB_PORT
- ORDER_HOST
- ORDER_PORT
- ORDER_DB_HOST
- ORDER_DB_PORT
ports:
- "${ORDER_PORT}:8081"
volumes:
- ./order-service:/app
- /app/node_modules
depends_on:
- order-db
###############################################
## NOTIFICATION-SERVICE
###############################################
notification-db:
image: postgres
container_name: notification-db
environment:
POSTGRES_DB: notification
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- ./pgdata-notification:/var/lib/postgresql/data
ports:
- "${NOTIFICATION_DB_PORT}:5432"
notification-service:
build: ./notification-service
command: npm run start:dev
container_name: notification
environment:
- CORE_HOST
- CORE_PORT
- CORE_DB_HOST
- CORE_DB_PORT
- NOTIFICATION_HOST
- NOTIFICATION_PORT
- NOTIFICATION_DB_HOST
- NOTIFICATION_DB_PORT
- PREFERENCE_HOST
- PREFERENCE_PORT
- PREFERENCE_DB_HOST
- PREFERENCE_DB_PORT
- ORDER_HOST
- ORDER_PORT
- ORDER_DB_HOST
- ORDER_DB_PORT
ports:
- "${NOTIFICATION_PORT}:8081"
volumes:
- ./notification-service:/app
- /app/node_modules
depends_on:
- notification-db
###############################################
## CORE-API
###############################################
core-db:
image: postgres
container_name: core-db
environment:
POSTGRES_DB: core
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- ./pgdata-core:/var/lib/postgresql/data
ports:
- "${CORE_DB_PORT}:5432"
core-api:
build: ./core-api
command: npm run start:dev
container_name: core
environment:
- CORE_HOST
- CORE_PORT
- CORE_DB_HOST
- CORE_DB_PORT
- NOTIFICATION_HOST
- NOTIFICATION_PORT
- NOTIFICATION_DB_HOST
- NOTIFICATION_DB_PORT
- PREFERENCE_HOST
- PREFERENCE_PORT
- PREFERENCE_DB_HOST
- PREFERENCE_DB_PORT
- ORDER_HOST
- ORDER_PORT
- ORDER_DB_HOST
- ORDER_DB_PORT
ports:
- "${CORE_PORT}:8080"
volumes:
- ./core-api:/app
- /app/node_modules
depends_on:
- core-db
- order-service
- preference-service
- notification-service