-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (64 loc) · 1.43 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (64 loc) · 1.43 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
services:
# 1. Frontend Web Server (Apache2)
web:
image: httpd:latest
container_name: apache_web
ports:
- "8080:80"
volumes:
- ./html:/usr/local/apache2/htdocs/
networks:
- web_network
depends_on:
- db
# 2. Backend Database Store (MySQL)
db:
image: mysql:8.0
container_name: mysql_db
environment:
MYSQL_ROOT_PASSWORD: SuperSecretRoot2026!
MYSQL_DATABASE: campus_info_db
MYSQL_USER: infra_db_admin
MYSQL_PASSWORD: SysP@ssW0rd!2026
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- web_network
# 3. Web Status Probe (Blackbox Exporter)
blackbox:
image: prom/blackbox-exporter:latest
container_name: blackbox_exporter
ports:
- "9115:9115"
networks:
- web_network
# 4. Metrics Database (Prometheus)
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
networks:
- web_network
depends_on:
- blackbox
# 5. Visualization Dashboard (Grafana)
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
networks:
- web_network
depends_on:
- prometheus
networks:
web_network:
driver: bridge
volumes:
db_data: