-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
66 lines (56 loc) · 1.46 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
version: "3.3"
services:
# https://hub.docker.com/r/prom/mysqld-exporter
mysqlexporter:
image: prom/mysqld-exporter
ports:
- 9104:9104
environment:
- DATA_SOURCE_NAME=si3mshady:passwd@(db:3306)/
depends_on:
- db
- wordpress
grafana:
image: grafana/grafana
ports:
- '3000:3000'
prometheus:
image: prom/prometheus
volumes:
- ./:/etc/prometheus/ #host:container
command:
- '--config.file=/etc/prometheus/prom_config.yml'
ports:
- 9090:9090
wordpress:
image: wordpress
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: si3mshady
WORDPRESS_DB_PASSWORD: passwd
WORDPRESS_DB_NAME: wordpress
volumes:
- wordpress:/var/www/html
db:
# platform: linux/x86_64
image: mysql:5.7
restart: always
ports:
- 3306:3306 #port not exposed by default
environment:
MYSQL_DATABASE: wordpress
MYSQL_USER: si3mshady
MYSQL_PASSWORD: passwd
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- db:/var/lib/mysql
volumes:
wordpress:
db:
# https://github.com/go-sql-driver/mysql#dsn-data-source-name
# https://github.com/go-sql-driver/mysql#dsn-data-source-name
# https://stackoverflow.com/questions/57347415/cant-monitor-mysql-using-prometheus-docker-and-prom-mysqld-exporter-image
# https://github.com/prometheus/mysqld_exporter/issues/440