-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
43 lines (41 loc) · 933 Bytes
/
docker-compose.yaml
File metadata and controls
43 lines (41 loc) · 933 Bytes
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
services:
postgres:
image: postgres:latest
environment:
- POSTGRES_DB=simple_bank
- POSTGRES_USER=root
- POSTGRES_PASSWORD=secret
ports:
- target: 5432
published: 5432
protocol: tcp
mode: host
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:7.4.1-alpine
ports:
- target: 6379
published: 6379
protocol: tcp
mode: host
volumes:
- redis_data:/data
api:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
- "9090:9090"
environment:
- DB_SOURCE=postgresql://root:secret@localhost:5432/simple_bank?sslmode=disable
- REDIS_ADDRESS=redis:6379
depends_on:
- postgres
- redis
entrypoint: ["/app/wait-for.sh", "postgres:5432", "--", "/app/start.sh"]
command: ["/app/main"]
volumes:
postgres_data:
redis_data: