-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
160 lines (150 loc) · 3.24 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
version: "3"
services:
mongodb:
image: mongo
container_name: mongodb
volumes:
- ./.docker/mongodb/data:/data/db
ports:
- "27017-27019:27017-27019"
postgres:
image: postgres
container_name: postgres
restart: always
environment:
- POSTGRES_USER=user
- POSTGRES_DB=erp
- POSTGRES_PASSWORD=pass
volumes:
- postgres-volume:/var/lib/postgresql/data
ports:
- 5432:5432
healthcheck:
test: nc -z localhost 5432
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: rabbitmq
volumes:
- ./.docker/rabbitmq/etc/:/etc/rabbitmq/
- ./.docker/rabbitmq/data/:/var/lib/rabbitmq/
- ./.docker/rabbitmq/logs/:/var/log/rabbitmq/
ports:
- 5672:5672
- 15672:15672
service-registry:
build:
context: ./service-registry
args:
SERVICE_PORT: 50250
restart: always
volumes:
- ./service-registry:/usr/src/app
ports:
- 50250:50250
auth-service:
build:
context: ./auth-service
args:
SERVICE_PORT: 50270
depends_on:
- service-registry
- mongodb
restart: always
environment:
REGISTRY_URL: http://service-registry:50250
volumes:
- ./auth-service:/usr/src/app
ports:
- 50270:50270
file-service:
build:
context: ./file-service
args:
SERVICE_PORT: 50400
depends_on:
- service-registry
restart: always
environment:
REGISTRY_URL: http://service-registry:50250
volumes:
- ./file-service:/usr/src/app
- ./.docker/file-service/data/:/usr/src/app/files
ports:
- 50400:50400
hr-service:
build:
context: ./hr-service
args:
SERVICE_PORT: 50300
depends_on:
- service-registry
- postgres
restart: always
environment:
REGISTRY_URL: http://service-registry:50250
volumes:
- ./hr-service:/usr/src/app
ports:
- 50300:50300
item-service:
build:
context: ./item-service
args:
SERVICE_PORT: 50280
depends_on:
- service-registry
- postgres
restart: always
environment:
REGISTRY_URL: http://service-registry:50250
volumes:
- ./item-service:/usr/src/app
ports:
- 50280:50280
selling-service:
build:
context: ./selling-service
args:
SERVICE_PORT: 50290
depends_on:
- service-registry
- postgres
restart: always
environment:
REGISTRY_URL: http://service-registry:50250
volumes:
- ./selling-service:/usr/src/app
ports:
- 50290:50290
main-service:
build:
context: ./main-app
args:
SERVICE_PORT: 5000
depends_on:
- service-registry
restart: always
environment:
REGISTRY_URL: http://service-registry:50250
volumes:
- ./main-app:/usr/src/app
ports:
- 5000:5000
ui-app:
build:
context: ./ui-app
args:
SERVICE_PORT: 8080
# depends_on:
# - main-service
restart: always
environment:
REACT_APP_API_URL: http://localhost:5000
volumes:
- ./ui-app:/usr/src/app
- /usr/src/app/node_modules
ports:
- 8080:8080
volumes:
postgres-volume:
driver: local