-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
86 lines (77 loc) · 1.63 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
version: "3"
services:
consul:
image: consul:1.6.1
container_name: consul
ports:
- 8300:8300
- 8400:8400
- 8500:8500
service:
container_name: "service"
build:
context: Service
dockerfile: Dockerfile
ports:
- 9080:8080
- 65193:65193
environment:
- EMPLOYEE_HOST=employee:8080
- ROLE_HOST=role:8080
- DEPARTMENT_HOST=department:8080
restart: on-failure
depends_on:
- employee
- role
- department
employee:
container_name: "employee"
build:
context: Employee
dockerfile: Dockerfile
env_file: .env
environment:
- MONGO_HOST=employee-database
restart: on-failure
depends_on:
- consul
- employee-database
employee-database:
image: mongo:4.0.10
container_name: employee-database
env_file: .env
restart: on-failure
role:
container_name: "role"
build:
context: Role
dockerfile: Dockerfile
env_file: .env
environment:
- MONGO_HOST=role-database
restart: on-failure
depends_on:
- consul
- role-database
role-database:
image: mongo:4.0.10
container_name: role-database
env_file: .env
restart: on-failure
department:
container_name: "department"
build:
context: Department
dockerfile: Dockerfile
env_file: .env
environment:
- MONGO_HOST=department-database
restart: on-failure
depends_on:
- consul
- department-database
department-database:
image: mongo:4.0.10
container_name: department-database
env_file: .env
restart: on-failure