forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (53 loc) · 1.07 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
version: '3.5'
services:
api1: &api
image: krymancer/rinha-de-backend-2024-q1-zig
hostname: api1
network_mode: host
environment:
- PORT=3000
depends_on:
db:
condition: service_healthy
deploy:
resources:
limits:
cpus: '0.1'
memory: '10MB'
api2:
<<: *api
environment:
- PORT=3001
db:
image: postgres
hostname: db
network_mode: host
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: user
POSTGRES_DB: db
volumes:
- ./conf/postgres/:/docker-entrypoint-initdb.d/
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 10s
timeout: 5s
retries: 5
deploy:
resources:
limits:
cpus: '1.0'
memory: '400MB'
nginx:
image: nginx:latest
network_mode: host
volumes:
- ./conf/nginx/:/etc/nginx/
depends_on:
- api1
- api2
deploy:
resources:
limits:
cpus: '0.3'
memory: '130MB'