/
docker-compose.yml
96 lines (89 loc) · 1.52 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: '3.9'
services:
db:
container_name: db
hostname: db
image: postgres:latest
ports:
- "5432:5432"
expose:
- 5432
healthcheck:
test: ["CMD", "pg_isready -U ${DB_USER:-pguser} -d ${DB_NAME:-starkbank}"]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
env_file:
- .env
environment:
POSTGRES_USER: ${DB_USER:-pguser}
POSTGRES_PASSWORD: ${DB_PASSWORD:-pgpwd}
POSTGRES_DB: ${DB_NAME:-starkbank}
restart: always
networks:
- default
api:
container_name: api
hostname: api
build:
context: .
args:
NAME: api
ports:
- "8000:8000"
expose:
- 8000
env_file:
- .env
networks:
- default
depends_on:
- db
worker:
container_name: worker
hostname: worker
build:
context: .
args:
NAME: worker
env_file:
- .env
networks:
- default
depends_on:
- api
- redis
redis:
container_name: redis
hostname: redis
image: redis:latest
ports:
- "6379:6379"
expose:
- 6379
env_file:
- .env
restart: always
networks:
- default
dashboard:
container_name: dashboard
hostname: dashboard
build:
context: .
args:
NAME: dashboard
ports:
- 5555:5555
expose:
- 5555
env_file:
- .env
networks:
- default
depends_on:
- redis
networks:
default:
driver: bridge