forked from TrystanLea/emoncms-docker-fpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
86 lines (81 loc) · 1.86 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
version: "2"
services:
php:
build:
context: './php/'
volumes:
- www:/var/www/
- phpfina:/var/opt/emoncms/phpfina
- phptimeseries:/var/opt/emoncms/phptimeseries
- emoncms-log:/var/log/emoncms
- var-lock:/var/lock
environment:
- "MYSQL_HOST=db"
- "MYSQL_PORT=3306"
- "MYSQL_DATABASE=emoncms"
- "MYSQL_USER=emoncms"
- "MYSQL_PASSWORD=emoncms"
- "MYSQL_RANDOM_ROOT_PASSWORD=yes"
- "REDIS_ENABLED=true"
- "REDIS_HOST=redis"
- "REDIS_PORT=6379"
- "REDIS_PREFIX='emoncms'"
- "MQTT_ENABLED=true"
- "MQTT_HOST=mqtt"
- "MQTT_USER=emonpi"
- "MQTT_PASSWORD=emonpimqtt2016"
- "MQTT_BASETOPIC=emon"
- "PHPFINA_DIR=/var/opt/emoncms/phpfina/"
- "PHPTIMESERIES_DIR=/var/opt/emoncms/phptimeseries/"
ports:
- "9000:9000"
apache:
build:
context: './apache/'
depends_on:
- php
- db
ports:
- "8080:80"
volumes:
- www:/var/www/
db:
image: mariadb:latest
volumes:
- db:/var/lib/mysql
environment:
- "MYSQL_HOST=db"
- "MYSQL_PORT=3306"
- "MYSQL_DATABASE=emoncms"
- "MYSQL_USER=emoncms"
- "MYSQL_PASSWORD=emoncms"
- "MYSQL_RANDOM_ROOT_PASSWORD=yes"
redis:
image: redis:5
volumes:
- redis:/data
logging:
driver: json-file
options:
max-size: "10m"
mqtt:
image: eclipse-mosquitto:1.6
ports:
- 1884:1883
emoncms_mqtt:
build:
context: './emoncms_mqtt/'
depends_on:
- php
- db
volumes:
- www:/var/www/
command: sh -c "sleep 5; SCRIPT_FILENAME=/var/www/emoncms/scripts/services/emoncms_mqtt/emoncms_mqtt.php REQUEST_METHOD=GET cgi-fcgi -bind -connect php:9000"
volumes:
db:
www:
redis:
phpfina:
phptimeseries:
emoncms-log:
var-lock: