forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
52 lines (49 loc) · 1.1 KB
/
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
version: "3.8"
services:
api1: &api
image: hstreb/rinha-2024-q1-vertx:0.0.2-native
depends_on:
db:
condition: service_healthy
network_mode: "host"
deploy:
resources:
limits:
cpus: '0.3'
memory: '165MB'
api2:
<<: *api
environment:
- HTTP_PORT=8081
nginx:
image: nginx:1.25.4
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
network_mode: "host"
deploy:
resources:
limits:
cpus: '0.1'
memory: '70MB'
db:
image: postgres:16.2
hostname: db
command: -p 5432
network_mode: "host"
volumes:
- ./docker/db/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./docker/db/postgresql.conf:/docker-entrypoint-initdb.d/postgresql.conf
environment:
- POSTGRES_USER=rinha
- POSTGRES_PASSWORD=rinha123
- POSTGRES_DB=rinha
deploy:
resources:
limits:
cpus: '0.8'
memory: '150MB'
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U rinha" ]
interval: 2s
timeout: 1s
retries: 30