-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
160 lines (148 loc) · 3.49 KB
/
docker-compose.yml
File metadata and controls
160 lines (148 loc) · 3.49 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
version: '3.9'
services:
frontend:
build: ./frontend_service
restart: unless-stopped
container_name: frontend
env_file: ./frontend_service/.env
ports:
- "4444:4444"
depends_on:
- backend
networks:
- monitoring
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4444"]
interval: 30s
timeout: 10s
retries: 3
scraper:
build: ./scrapper_python_scrapy_pg
restart: unless-stopped
container_name: scraper
depends_on:
- postgres
networks:
- monitoring
env_file: ./scrapper_python_scrapy_pg/.env
command: ["sh", "-c", "./wait-for-it.sh postgres:5432 --timeout=30 --strict -- python start_spiders.py"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:6800"]
interval: 30s
timeout: 10s
retries: 3
backend:
build: ./backend_service
restart: unless-stopped
container_name: backend
env_file: ./backend_service/.env
ports:
- "3001:3001"
networks:
- monitoring
depends_on:
- rabbitmq
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001"]
interval: 30s
timeout: 10s
retries: 3
node_exporter:
image: prom/node-exporter:latest
container_name: node_exporter
ports:
- "9100:9100"
networks:
- monitoring
prometheus:
image: prom/prometheus:latest
restart: unless-stopped
container_name: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- "9090:9090"
networks:
- monitoring
grafana:
image: grafana/grafana:latest
restart: unless-stopped
container_name: grafana
ports:
- "3000:3000"
depends_on:
- prometheus
volumes:
- grafana-data:/var/lib/grafana
networks:
- monitoring
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.47.0
restart: unless-stopped
container_name: cadvisor
privileged: true
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
ports:
- "8080:8080"
networks:
- monitoring
postgres:
image: postgres:latest
restart: unless-stopped
container_name: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: scrapped_data
volumes:
- ./data/postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- monitoring
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 10s
retries: 3
rabbitmq:
image: rabbitmq:latest
restart: unless-stopped
container_name: rabbitmq
ports:
- "5672:5672"
networks:
- monitoring
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 30s
timeout: 10s
retries: 3
redis:
image: redis:latest
restart: unless-stopped
container_name: redis
command: redis-server --requirepass redisPassword
ports:
- "6379:6379"
networks:
- monitoring
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
volumes:
grafana-data:
networks:
monitoring:
driver: bridge