forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
60 lines (55 loc) · 1.19 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
version: '3'
services:
api01: &api
image: gustavonovaes/rinha-backend-2024-go:latest
environment:
API_PORT: 3000
DATABASE_URL: "postgres://rinha:rinha@postgres:5432/rinha?sslmode=disable"
restart: unless-stopped
networks:
- default
deploy:
resources:
limits:
cpus: '0.25'
memory: 100MB
api02:
<<: *api
nginx:
image: nginx:1.25
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- api01
- api02
networks:
- default
ports:
- 9999:80
restart: unless-stopped
deploy:
resources:
limits:
cpus: '0.50'
memory: 100MB
postgres:
image: postgres:16
command: postgres -c config_file=/etc/postgresql/postgresql.conf
volumes:
- ./postgresql.conf:/etc/postgresql/postgresql.conf:ro
- ./schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
ports:
- 5432:5432
environment:
POSTGRES_DB: "rinha"
POSTGRES_USER: "rinha"
POSTGRES_PASSWORD: "rinha"
deploy:
resources:
limits:
cpus: '0.50'
memory: 250MB
networks:
default:
driver: bridge
name: network