forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
51 lines (51 loc) · 1.13 KB
/
docker-compose.yaml
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
services:
db:
image: postgres
command: postgres -c config_file=/etc/postgresql/postgresql.conf
volumes:
- ./script.sql:/docker-entrypoint-initdb.d/01-create.sql
- ./postgresql.conf:/etc/postgresql/postgresql.conf
environment:
- POSTGRES_USER=rbe
- POSTGRES_PASSWORD=123456
- POSTGRES_DB=rbe
network_mode: host
deploy:
resources:
limits:
cpus: "1"
memory: "300MB"
api1: &api
image: picklesdog70/rbe-api-go:20240218121800
environment:
- RBE_DB_MAX_CONNS=14
- RBE_DB_MAX_IDLE_CONNS=4
- APP_PORT=8889
network_mode: host
deploy:
resources:
limits:
cpus: "0.15"
memory: "110MB"
depends_on:
- db
api2:
<<: *api
environment:
- RBE_DB_MAX_CONNS=14
- RBE_DB_MAX_IDLE_CONNS=4
- APP_PORT=8888
network_mode: host
lb:
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
network_mode: host
deploy:
resources:
limits:
cpus: "0.20"
memory: "30MB"
depends_on:
- api1
- api2