-
Notifications
You must be signed in to change notification settings - Fork 925
/
docker-compose.yml
73 lines (67 loc) · 1.4 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
version: "3.5"
services:
db:
image: mysql:5.7
container_name: mysql
restart: unless-stopped
networks:
- default
platform: linux/amd64
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: mysql-db
MYSQL_PASSWORD: root
ports:
- 3306:3306
volumes:
- ./script.sql:/docker-entrypoint-initdb.d/script.sql
healthcheck:
test: ["CMD-SHELL", "exit | mysql -h localhost -P 3306 -u root -p$$MYSQL_ROOT_PASSWORD" ]
interval: 5s
timeout: 20s
retries: 30
start_period: 30s
deploy:
resources:
limits:
cpus: "1"
memory: "430MB"
api01: &api
image: kleytonsolinho/rinha-de-backend-2024-q1:latest
hostname: api01
platform: linux/amd64
restart: unless-stopped
networks:
- default
environment:
- DB_HOSTNAME=db
depends_on:
db:
condition: service_healthy
deploy:
resources:
limits:
cpus: "0.20"
memory: "35MB"
api02:
<<: *api
hostname: api02
nginx:
container_name: nginx
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api01
- api02
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: "0.1"
memory: "50MB"
networks:
default:
driver: bridge
name: rinha-nginx-2024q1