-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathdocker-swarm.yml
130 lines (118 loc) · 2.5 KB
/
docker-swarm.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
version: '3'
networks:
lb:
driver: overlay
cote:
driver: overlay
services:
lb:
image: dockercloud/haproxy
deploy:
placement:
constraints:
- node.role == manager
networks:
- lb
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 80:80
- 443:443
admin:
image: dashersw/cote-workshop
networks:
- lb
- cote
command: node admin/server.js
environment:
- PG=true
- COTE_DISCOVERY_REDIS_HOST=redis
- VIRTUAL_HOST=local-admin.cotejs.org, ws://local-admin.cotejs.org
- SERVICE_PORTS=5000
- BALANCE=source
end-user:
networks:
- lb
- cote
image: dashersw/cote-workshop
command: node end-user/server.js
environment:
- PG=true
- COTE_DISCOVERY_REDIS_HOST=redis
- VIRTUAL_HOST=local-end-user.cotejs.org, ws://local-end-user.cotejs.org
- SERVICE_PORTS=5001
- BALANCE=source
monitoring:
networks:
- lb
- cote
image: dashersw/cote-workshop
command: node monitor.js
environment:
- PG=true
- COTE_DISCOVERY_REDIS_HOST=redis
- SERVICE_PORTS=5555
- VIRTUAL_HOST=local-monitoring.cotejs.org
payment-service:
networks:
- cote
image: dashersw/cote-workshop
command: node services/payment-service.js
environment:
- PG=true
- COTE_DISCOVERY_REDIS_HOST=redis
depends_on:
- db
product-service:
networks:
- cote
image: dashersw/cote-workshop
command: node services/product-service.js
environment:
- PG=true
- COTE_DISCOVERY_REDIS_HOST=redis
depends_on:
- db
purchase-service:
networks:
- cote
image: dashersw/cote-workshop
command: node services/purchase-service.js
environment:
- PG=true
- COTE_DISCOVERY_REDIS_HOST=redis
depends_on:
- db
user-service:
networks:
- cote
image: dashersw/cote-workshop
command: node services/user-service.js
environment:
- PG=true
- COTE_DISCOVERY_REDIS_HOST=redis
depends_on:
- db
redis:
image: redis
networks:
- cote
ports:
- 6379:6379
db:
networks:
- cote
image: dashersw/cote-workshop
command: node init-db.js
environment:
- PG=true
depends_on:
- postgres
postgres:
networks:
- cote
image: sameersbn/postgresql:9.6-1
environment:
- DB_USER=cote
- DB_PASS=ohgath2ig8eoP8
- DB_NAME=cote