-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
45 lines (42 loc) · 1.06 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
version: '3.9'
services:
db:
image: postgres:16-alpine
volumes:
- ./db/initdb.sql:/docker-entrypoint-initdb.d/initdb.sql:ro
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: rinha
deploy:
resources:
limits:
cpus: "0.5"
memory: "130MB"
command: postgres -c max_connections=300
app:
image: ghcr.io/ilosamart/docker-registry/rinhaapp:1.2.0
depends_on:
- db
environment:
SQLALCHEMY_DATABASE_URL: postgresql+asyncpg://postgres:postgres@db:5432/rinha
WEB_CONCURRENCY: 4
deploy:
replicas: 2
resources:
limits:
cpus: "0.4"
memory: "200MB"
command: /app/.venv/bin/uvicorn --host 0.0.0.0 --port 8000 --log-level error --no-access-log --loop uvloop --http h11 --interface asgi3 main:app
nginx:
image: nginx:1.25.3
volumes:
- ./proxy/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app
ports:
- "9999:80"
deploy:
resources:
limits:
cpus: "0.2"
memory: "20MB"