-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
47 lines (44 loc) · 1.1 KB
/
docker-compose.yaml
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
version: "3"
services:
mysql:
image: mysql:8.2.0
container_name: mysql-for-switchbot
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: switchbot-logs
MYSQL_USER: grafana
MYSQL_PASSWORD: grafana
TZ: 'Asia/Tokyo'
ports:
- 33306:3306/tcp
volumes:
- ./mysql/db/data:/var/lib/mysql
- ./mysql/db/my.cnf:/etc/mysql/conf.d/my.cnf
- ./mysql/db/sql:/docker-entrypoint-initdb.d
switchbot-logger:
depends_on:
- mysql
build:
context: "./switchbot-logger"
dockerfile: "Dockerfile"
container_name: switchbot-logger
image: python-switchbot-logger:0.1.0
restart: unless-stopped
network_mode: "host"
cap_add:
- NET_ADMIN
- NET_RAW
volumes:
- ./switchbot-logger/conf/default.yaml:/opt/app/conf/default.yaml
command: --mac "ab:cd:ef:12:34:56"
grafana:
depends_on:
- mysql
image: grafana/grafana-oss:10.2.2
container_name: grafana
restart: unless-stopped
volumes:
- ./grafana:/var/lib/grafana
ports:
- 33000:3000/tcp # WebUI