-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
99 lines (93 loc) · 2.38 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
version: '2.2'
services:
mqtt:
image: eclipse-mosquitto:1.6.9
container_name: smarthome-mqtt
restart: always
volumes:
- ./data/mqtt/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
ports:
- 1883:1883
- 1884:1884
mem_limit: 512M
memswap_limit: 0M
cpu_shares: 2048
mqtt-gaming:
image: eclipse-mosquitto:1.6.9
container_name: smarthome-mqtt-gaming
restart: always
volumes:
- ./data/mqtt/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
ports:
- 12345:1883
- 12346:1884
mem_limit: 512M
memswap_limit: 0M
cpu_shares: 2048
zigbee2mqtt:
image: koenkk/zigbee2mqtt:1.25.2
# image: koenkk/zigbee2mqtt:1.18.1
container_name: smarthome-zigbee2mqtt
depends_on:
- mqtt
restart: always
devices:
- $DEVICE_ZIGBEE:/dev/ttyACM0
volumes:
- ./data/zigbee2mqtt:/app/data
environment:
- TZ=$TIMEZONE
mem_limit: 512M
memswap_limit: 0M
cpu_shares: 2048
db:
image: mariadb:10.2.32
container_name: smarthome-db
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- ./data/db:/var/lib/mysql
environment:
# - MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
- MYSQL_ALLOW_EMPTY_PASSWORD=$MYSQL_ALLOW_EMPTY_PASSWORD
- MYSQL_PASSWORD=$MYSQL_PASSWORD
- MYSQL_DATABASE=$MYSQL_DATABASE
- MYSQL_USER=$MYSQL_USER
mem_limit: 1G
memswap_limit: 0M
cpu_shares: 2048
app:
image: smarthome:0.1.0
container_name: smarthome-app
build:
context: ./app
args:
DOCKER_TIMEZONE: $TIMEZONE
depends_on:
- mqtt
- db
restart: always
devices:
- $DEVICE_CEC:/dev/ttyACM0
# network_mode: host
ports:
- $PORT_WEB:80
volumes:
- ./data/app:/app/data
# TODO: remove mounts - used for development
- ./app/app/modules/core/src:/app/modules/core/src
- ./app/app/web/Core:/app/web/Core
- ./app/app/web/UI:/app/web/UI
- ./app/app/web/res:/app/web/res
- ./tmp/app/go:/root/go
- ./tmp/app/go-build:/root/.cache/go-build
environment:
- MYSQL_PASSWORD=$MYSQL_PASSWORD
- MYSQL_DATABASE=$MYSQL_DATABASE
- MYSQL_USER=$MYSQL_USER
- MYSQL_HOST=$MYSQL_HOST
- APP_ENV=$APP_ENV
- HOST_IP=$HOST_IP
mem_limit: 1G
memswap_limit: 0M
cpu_shares: 2048