-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yml
68 lines (64 loc) · 1.39 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
61
62
63
64
65
66
67
68
version: "3.8"
services:
app1: &app1
image: ogabriel/rinha-de-backend-2024-q1:golang
restart: always
environment: &env_app1
DATABASE_HOST: 127.0.0.1
DATABASE_USER: postgres
DATABASE_PASS: postgres
DATABASE_PORT: 5432
DATABASE_NAME: rinha
DATABASE_POOL: 2
PORT: 9997
GIN_MODE: release
GOGC: off
GOMEMLIMIT: 110MiB
GOMAXPROCS: 1
network_mode: host
depends_on:
- postgres
command: ["migrate_and_release"]
deploy:
resources:
limits:
cpus: '0.25'
memory: '120MB'
app2:
<<: *app1
depends_on:
- app1
environment:
<<: *env_app1
PORT: 9998
command: ["release"]
nginx:
image: nginx:1.25.3-alpine
restart: always
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
command: ["nginx", "-g", "daemon off;"]
network_mode: host
depends_on:
- app1
- app2
deploy:
resources:
limits:
cpus: '0.3'
memory: '50MB'
postgres:
image: postgres:16.2-alpine
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
network_mode: host
volumes:
- ./postgresql.conf:/etc/postgresql.conf
command: ["postgres", "-c", "config_file=/etc/postgresql.conf"]
deploy:
resources:
limits:
cpus: '0.7'
memory: '260MB'