-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (47 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
47
48
49
50
51
version: "3.5"
services:
api01: &api
image: jovitcorreia/rdb2024q1
environment:
- HTTP_PORT=8080
depends_on:
- db
network_mode: "host"
deploy:
resources:
limits:
cpus: "0.4"
memory: "70MB"
api02:
<<: *api
environment:
- HTTP_PORT=8081
db:
image: postgres:latest
volumes:
- ./conf/postgresql.conf:/etc/postgresql/postgresql.conf
- ./data/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=pwd
- POSTGRES_DB=rdb2024q1
command: postgres -c config_file=/etc/postgresql/postgresql.conf
network_mode: "host"
deploy:
resources:
limits:
cpus: "0.5"
memory: "390MB"
nginx:
image: nginx:latest
volumes:
- ./conf/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api01
- api02
network_mode: "host"
deploy:
resources:
limits:
cpus: "0.2"
memory: "20MB"