-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
55 lines (51 loc) · 1.08 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
version: "3.9"
services:
db:
container_name: rinha-pg
image: postgres:16.1
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "5432:5432"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
deploy:
resources:
limits:
cpus: '0.56'
memory: '400MB'
app: &app
image: ghcr.io/tsugami/rinha-de-backend-2024-q1-golang:main
environment:
- DATABASE_URL=postgres://postgres:postgres@db:5432/postgres
depends_on:
db:
condition: service_healthy
deploy:
resources:
limits:
cpus: "0.37"
memory: "60MB"
app0:
<<: *app
nginx:
image: nginx:latest
ports:
- 9999:9999
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app
- app0
deploy:
resources:
limits:
cpus: '0.2'
memory: '30MB'