-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
57 lines (54 loc) · 1.13 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
services:
load.balancer:
image: nginx:1.27.2
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- banquo
ports:
- "9999:9999"
restart: on-failure
deploy:
resources:
limits: # pequena
cpus: "0.3"
memory: "50MB"
banquo:
image: banquo
hostname: banquo
environment:
- DB_CONNECTION_STRING=Host=db;Username=admin;Password=123;Database=banquo
- BACEN_API_URL=http://bacen:8080/transferencias
depends_on:
- db
restart: on-failure
networks:
- default
- bacen
deploy:
mode: replicated
replicas: 3
resources:
limits: # grande
cpus: "1.0"
memory: "200MB"
db:
image: postgres:17.0
hostname: db
environment:
- POSTGRES_PASSWORD=123
- POSTGRES_USER=admin
- POSTGRES_DB=banquo
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
restart: on-failure
deploy:
resources:
limits: # grande
cpus: "1.0"
memory: "200MB"
networks:
default:
driver: bridge
bacen:
external: true