-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (69 loc) · 1.83 KB
/
docker-compose.yml
File metadata and controls
74 lines (69 loc) · 1.83 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
# Base docker compose, added to by docker-compose.override or docker-compose.prod. See Readme.md
services:
# PHP & apache container with s6-overlay managing web server and background workers
web:
image: openenergymonitor/emoncms:latest
build: web/.
volumes:
- emon-phpfina:/var/opt/emoncms/phpfina
- emon-phptimeseries:/var/opt/emoncms/phptimeseries
links:
- db
- redis
- mqtt
depends_on:
redis:
condition: service_healthy
db:
image: mariadb:11.0
environment:
- "MYSQL_HOST=localhost"
- "MARIADB_AUTO_UPGRADE=1"
- "MARIADB_INITDB_SKIP_TZINFO=1"
volumes:
- emon-db-data:/var/lib/mysql
logging:
driver: json-file
options:
max-size: "10m"
redis:
image: redis:7.0
volumes:
- emon-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 2s
timeout: 3s
retries: 15
start_period: 5s
logging:
driver: json-file
options:
max-size: "10m"
# No local image build: extra layers on eclipse-mosquitto can hit BuildKit "max depth exceeded"
# on some Docker Desktop setups. Config + passwd are applied at container start (see mqtt/setup.sh).
mqtt:
image: eclipse-mosquitto:2.0
volumes:
- ./mqtt/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
command:
- /bin/sh
- -c
- |
touch /mosquitto/config/passwd
/usr/bin/mosquitto_passwd -b /mosquitto/config/passwd emonpi emonpimqtt2016
exec /usr/sbin/mosquitto -c /mosquitto/config/mosquitto.conf
restart: always
logging:
driver: json-file
options:
max-size: "10m"
volumes:
emon-phpfina:
driver: local
emon-phptimeseries:
driver: local
emon-db-data:
driver: local
emon-redis-data:
driver: local