-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-swarm.yml
176 lines (166 loc) · 3.96 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
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
version: '3'
networks:
fiap_stock_net_overlay:
external: true
services:
redis:
image: redis
networks:
- fiap_stock_net_overlay
deploy:
replicas: 1
restart_policy:
condition: on-failure
max_attempts: 3
placement:
constraints:
- node.role == worker
mongodb:
image: mongo
networks:
- fiap_stock_net_overlay
deploy:
replicas: 1
restart_policy:
condition: on-failure
max_attempts: 3
placement:
constraints:
- node.role == worker
mysql:
image: mysql
networks:
- fiap_stock_net_overlay
deploy:
replicas: 1
restart_policy:
condition: on-failure
max_attempts: 3
placement:
constraints:
- node.role == worker
environment:
MYSQL_ROOT_PASSWORD: fiap-persistencepwd
rabbitmq:
image: rabbitmq:3-management
networks:
- fiap_stock_net_overlay
deploy:
replicas: 1
restart_policy:
condition: on-failure
max_attempts: 3
placement:
constraints:
- node.role == worker
environment:
RABBITMQ_DEFAULT_USER: rabbit-usr
RABBITMQ_DEFAULT_PASS: rabbit-pwd
fiapsamplelogin:
image: jvillete/fiap.sample.login
networks:
- fiap_stock_net_overlay
environment:
MONGO_DB_HOST: mongodb
MONGO_DB_PORT: 27017
MONGO_DB_DATABASE: fiapSampleLogin
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ""
restart: on-failure
depends_on:
- redis
- mongodb
deploy:
replicas: 2
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == worker
fiapstockmgnt:
image: jvillete/fiap.stock.mgnt
networks:
- fiap_stock_net_overlay
environment:
MYSQL_JDBC_URL: jdbc:mysql://mysql:3306/stock?createDatabaseIfNotExist=true
MYSQL_USER_NAME: root
MYSQL_PASSWORD: fiap-persistencepwd
RABBIT_MQ_HOST: rabbitmq
RABBIT_MQ_PORT: 5672
RABBIT_MQ_USER_NAME: rabbit-usr
RABBIT_MQ_PASSWORD: rabbit-pwd
restart: on-failure
depends_on:
- mysql
- rabbitmq
deploy:
replicas: 2
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == worker
fiapstockportal:
image: jvillete/fiap.stock.portal
networks:
- fiap_stock_net_overlay
environment:
MONGO_DB_HOST: mongodb
MONGO_DB_PORT: 27017
MONGO_DB_DATABASE: fiapStockPortal
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ""
RABBIT_MQ_HOST: rabbitmq
RABBIT_MQ_PORT: 5672
RABBIT_MQ_USER_NAME: rabbit-usr
RABBIT_MQ_PASSWORD: rabbit-pwd
restart: on-failure
depends_on:
- redis
- mongodb
- rabbitmq
deploy:
replicas: 2
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == worker
fiapstockportalfront:
image: jvillete/fiap.stock.portal.front
networks:
- fiap_stock_net_overlay
environment:
FIAP_SAMPLE_LOGIN_BACKEND_HOST: fiapsamplelogin
FIAP_SAMPLE_LOGIN_BACKEND_PORT: 8181
FIAP_STOCK_PORTAL_BACKEND_HOST: fiapstockportal
FIAP_STOCK_PORTAL_BACKEND_PORT: 8383
ports:
- 3131:3131
deploy:
replicas: 2
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == worker
fiapstockmgntfront:
image: jvillete/fiap.stock.mgnt.front
networks:
- fiap_stock_net_overlay
environment:
FIAP_SAMPLE_LOGIN_BACKEND_HOST: fiapsamplelogin
FIAP_SAMPLE_LOGIN_BACKEND_PORT: 8181
FIAP_STOCK_MGNT_BACKEND_HOST: fiapstockmgnt
FIAP_STOCK_MGNT_BACKEND_PORT: 8282
ports:
- 3232:3232
deploy:
replicas: 2
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == worker