-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (69 loc) · 1.61 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
version: '3.8'
services:
api:
image: pablowinck/palestra-sincronizacao:1.0
environment:
DATABASE_URL: vertx-reactive:mysql://mysql:3306/compras
DATABASE_PASSWORD: 123456
MONGODB_CONNECTION_STRING: mongodb://mongodb:27017
API_URL: http://api2:8081
depends_on:
mysql:
condition: service_healthy
mongodb:
condition: service_healthy
ports:
- "8080:8080"
deploy:
resources:
limits:
cpus: "0.25"
memory: 200M
api2:
image: pablowinck/palestra-sincronizacao:1.0
environment:
DATABASE_URL: vertx-reactive:mysql://mysql:3306/compras
DATABASE_PASSWORD: 123456
MONGODB_CONNECTION_STRING: mongodb://mongodb:27017
SERVER_PORT: 8081
depends_on:
mysql:
condition: service_healthy
mongodb:
condition: service_healthy
ports:
- "8081:8081"
deploy:
resources:
limits:
cpus: "0.25"
memory: 200M
mysql:
image: mysql
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
retries: 10
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: compras
ports:
- "3306:3306"
deploy:
resources:
limits:
cpus: "1.0"
memory: 1G
mongodb:
image: mongo
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
timeout: 20s
retries: 10
ports:
- "27017:27017"
deploy:
resources:
limits:
cpus: "0.5"
memory: 500M