-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
136 lines (131 loc) · 3.13 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
version: '3.5'
services:
nginx:
image: nginx:latest
container_name: nginx
hostname: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api01
- api02
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: '0.10'
memory: '0.2GB'
reservations:
cpus: '0.10'
memory: '0.2GB'
networks:
net:
aliases:
- nginx
mongodb:
image: mongo:latest
container_name: mongodb
hostname: mongodb
# command: --wiredTigerCacheSizeGB 1.5
ports:
- "27017:27017"
deploy:
resources:
limits:
cpus: '0.90'
memory: '1.4GB'
reservations:
cpus: '0.90'
memory: '1.4GB'
networks:
net:
aliases:
- mongodb
# Image built for Mac M1 - fielcapao/rinha-de-backend-2023-q3-javarocks-native:macm1-arm64
# Image built for Linux - fielcapao/rinha-de-backend-2023-q3-javarocks-native:linux-amd64
api01:
image: fielcapao/rinha-de-backend-2023-q3-javarocks-native:macm1-arm64
container_name: api01
hostname: api01
depends_on:
- mongodb
environment:
- SPRING_DATA_MONGODB_URI=mongodb://mongodb:27017/test #?connectTimeoutMS=300000&minPoolSize=2000&&maxPoolSize=5000&maxIdleTimeMS=1000&maxConnecting=2000
- SERVER_PORT=8080
# - LOGGING_LEVEL_COM_EXAMPLE=debug
expose:
- "8080"
deploy:
resources:
limits:
cpus: '0.25'
memory: '0.7GB'
reservations:
cpus: '0.25'
memory: '0.7GB'
networks:
net:
aliases:
- api01
api02:
image: fielcapao/rinha-de-backend-2023-q3-javarocks-native:macm1-arm64
container_name: api02
hostname: api02
depends_on:
- mongodb
environment:
- SPRING_DATA_MONGODB_URI=mongodb://mongodb:27017/test #?connectTimeoutMS=300000&minPoolSize=2000&maxPoolSize=5000&maxIdleTimeMS=1000&maxConnecting=2000
- SERVER_PORT=8080
# - LOGGING_LEVEL_COM_EXAMPLE=debug
expose:
- "8080"
deploy:
resources:
limits:
cpus: '0.25'
memory: '0.7GB'
reservations:
cpus: '0.25'
memory: '0.7GB'
networks:
net:
aliases:
- api02
#
# prometheus:
# image: prom/prometheus
# container_name: prometheus
# command:
# - '--config.file=/etc/prometheus/prometheus.yml'
# volumes:
# - ./prometheus.yml:/etc/prometheus/prometheus.yml
# ports:
# - "9090:9090"
# depends_on:
# - nginx
# - api01
# - api02
#
# grafana:
# image: grafana/grafana
# container_name: grafana
# ports:
# - "3000:3000"
# environment:
# - GF_AUTH_ANONYMOUS_ENABLED=true
# - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
# - GF_SERVER_HTTP_PORT=3000
# depends_on:
# - prometheus
#
# setup_grafana_datasource:
# image: appropriate/curl
# container_name: setup_grafana_datasource
# depends_on:
# - grafana
# volumes:
# - ./create-datasource-and-dashboard.sh:/create.sh:ro
# command: /create.sh
networks:
net: