-
Notifications
You must be signed in to change notification settings - Fork 925
/
docker-compose.yml
72 lines (67 loc) · 1.35 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
version: '3.9'
services:
app01: &app01
image: maadamaceno/rinha-backend-q1-2024-ada:latest
environment:
DB_HOST: "db"
networks:
- rinha-network
depends_on:
db:
condition: service_healthy
deploy:
resources:
limits:
cpus: "0.45"
memory: "50MB"
app02:
<<: *app01
hostname: app02
db:
image: postgres:16-alpine
hostname: db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: rinha2024
volumes:
- type: bind
source: ./init.sql
target: /docker-entrypoint-initdb.d/init.sql
ports:
- 5432:5432
networks:
- rinha-network
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 7s
timeout: 5s
retries: 5
deploy:
resources:
limits:
cpus: "0.4"
memory: "420MB"
nginx:
image: nginx:1.25
ports:
- 9999:9999
volumes:
- type: bind
source: ./nginx.conf
target: /etc/nginx/nginx.conf
read_only: true
networks:
- rinha-network
restart: on-failure
depends_on:
- app01
- app02
deploy:
resources:
limits:
cpus: "0.2"
memory: "30MB"
networks:
rinha-network:
driver: bridge