-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
111 lines (99 loc) · 2.19 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
97
98
99
100
101
102
103
104
105
106
107
108
version: '3.8'
services:
db:
image: postgres
container_name: stock_dashboard_psql_db
volumes:
- ./pg_data:/var/lib/postgresql/data/pgdata
- ./db/stock_dashboard/:/docker-entrypoint-initdb.d/
env_file:
- docker.env
ports:
- 5432:5432
healthcheck:
test: pg_isready -h $POSTGRES_HOST -p $POSTGRES_PORT -d $POSTGRES_DB
interval: 30s
timeout: 30s
retries: 500
start_period: 3m
restart: on-failure
rmq:
image: rabbitmq:3-management
container_name: stock_dashboard_rmq
env_file:
- docker.env
volumes:
- ./rmq_data:/var/lib/rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
logging:
driver: none
ports:
- 15672:15672
- 5672:5672
command: rabbitmq-server
restart: on-failure
api:
build:
context: .
dockerfile: api.Dockerfile
container_name: stock_dashboard_api
depends_on:
db:
condition: service_healthy
rmq:
condition: service_healthy
scheduler:
condition: service_started
env_file:
- docker.env
environment:
LOGGING_CONF: /stock_dashboard_api/logging.conf
ports:
- 5000:5000
restart: on-failure
scheduler:
build:
context: .
dockerfile: scheduler.Dockerfile
container_name: stock_dashboard_scheduler
depends_on:
db:
condition: service_healthy
rmq:
condition: service_healthy
links:
- rmq
env_file:
- docker.env
environment:
LOGGING_CONF: /scheduler/workers_utils/logging.conf
restart: on-failure
worker:
build:
context: .
dockerfile: worker.Dockerfile
container_name: stock_dashboard_worker
depends_on:
db:
condition: service_healthy
rmq:
condition: service_healthy
links:
- rmq
env_file:
- docker.env
environment:
LOGGING_CONF: ./workers/workers/workers_utils/logging.conf
restart: on-failure
nginx:
build:
context: .
dockerfile: nginx.Dockerfile
container_name: nginx_server
ports:
- 8080:80
restart: on-failure