-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
56 lines (52 loc) · 970 Bytes
/
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
48
49
50
51
52
53
54
55
56
version: "3.9"
services:
postgres:
image: postgres:14-alpine
env_file:
- ./db.env
ports:
- "5432:5432"
networks:
- bank-network
volumes:
- postgres_data:/var/lib/postgresql/data/
redis:
image: redis:7-alpine
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]
ports:
- "6379:6379"
env_file:
- ./app.env
networks:
- bank-network
volumes:
- redis_data:/data
api:
build:
context: .
dockerfile: Dockerfile
environment:
- DB_HOST=postgres
- REDIS_HOST=redis
ports:
- "8088:8088"
- "9099:9099"
networks:
- bank-network
depends_on:
- postgres
- redis
entrypoint:
[
"/app/wait-for.sh",
"postgres:5432",
"redis:6379",
"--",
"/app/start.sh"
]
command: ["/app/main"]
networks:
bank-network:
volumes:
postgres_data:
redis_data: