-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
48 lines (44 loc) · 964 Bytes
/
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
version: "3.5"
name: "rinha-backend-2024-q1-felipma"
services:
database:
hostname: dbhost
image: postgres:16-alpine
environment:
POSTGRES_USER: dbuser
POSTGRES_PASSWORD: dbpassword
POSTGRES_DB: dbname
deploy:
resources:
limits:
cpus: "0.7"
memory: "150MB"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
api01: &api
image: felipma/rinha-backend-2024-q1-felipma:latest
depends_on:
- database
environment:
DATABASE_URL: "postgres://dbuser:dbpassword@dbhost:5432/dbname"
deploy:
resources:
limits:
cpus: "0.3"
memory: "150MB"
api02:
<<: *api
nginx:
image: nginx:alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api01
- api02
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: "0.2"
memory: "100MB"