-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
46 lines (44 loc) · 1.02 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
version: "3.9"
services:
api1: &api
image: vpithan/rb24q1:bun
deploy:
resources:
limits:
cpus: "0.4"
memory: "150MB"
environment:
- DATABASE_URL=postgresql://admin:123@postgres:5432/rinha?schema=public&connection_limit=30&pool_timeout=40
- PORT=9999
api2:
<<: *api
postgres:
image: postgres:16
environment:
- POSTGRES_PASSWORD=123
- POSTGRES_USER=admin
- POSTGRES_DB=rinha
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
command: postgres -c checkpoint_timeout=600 -c max_wal_size=4096 -c synchronous_commit=0 -c full_page_writes=0
deploy:
resources:
limits:
cpus: "0.6"
memory: "230MB"
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "9999:9999"
restart: on-failure
deploy:
resources:
limits:
cpus: "0.1"
memory: "20MB"
networks:
default:
driver: bridge
name: rinha-nginx-2024q1