-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathdocker-compose.yaml
47 lines (46 loc) · 1.01 KB
/
docker-compose.yaml
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
version: "3"
services:
postgres:
image: postgres:16.1
environment:
POSTGRES_USER: transacoes
POSTGRES_PASSWORD: transacoes
POSTGRES_DB: transacoes
volumes:
- ./postgresql.conf:/etc/postgresql/postgresql.conf
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
deploy:
resources:
limits:
cpus: "1"
memory: "400MB"
api1: &api
image: bbonagura9/rdb-24q1-api:latest
environment:
DB_ENGINE: postgres
DB_DSN: host=postgres user=transacoes password=transacoes sslmode=disable pool_max_conns=100
GIN_MODE: release
GOMAXPROCS: 1
depends_on:
- postgres
deploy:
resources:
limits:
cpus: "0.2"
memory: "50MB"
api2:
<<: *api
nginx:
image: nginx:1.25.3
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- 9999:9999
depends_on:
- api1
- api2
deploy:
resources:
limits:
cpus: "0.1"
memory: "50MB"