forked from emoncms/emoncms-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-cloudflare.yml
More file actions
54 lines (53 loc) · 1.43 KB
/
docker-compose-cloudflare.yml
File metadata and controls
54 lines (53 loc) · 1.43 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
services:
emoncms:
image: alexjunk/emoncms
volumes:
- type: bind
source: /mnt/emoncms
target: /data
bind:
create_host_path: true
environment:
- TZ=Europe/London
- REDIS_BUFFER=1 # 0 to disable low-write mode
- EMONCMS_LOG_LEVEL=2 # 1=INFO, 2=WARN, 3=ERROR
- MYSQL_DATABASE=emoncms
- MYSQL_USER=emoncms
- MYSQL_PASSWORD=emomcms
- MYSQL_ROOT_PASSWORD=emoncms
- MQTT_USER=""
- MQTT_PASSWORD=""
- MQTT_HOST=localhost
- MQTT_LOG_LEVEL=error
- CRT_FILE=/etc/ssl/apache2/server.pem
- KEY_FILE=/etc/ssl/apache2/server.key
- CNAME=localhost
ports:
# These ports are in format <host-port>:<container-port>
# - 7443:443 # Public HTTPS Port
- 8080:80 # Public HTTP Port
- 3306:3306
# - 9883:1883 # Public MQTT Port (if using the internal broker)
restart: always
cloudflare-tunnel:
image: cloudflare/cloudflared
container_name: cloudflare-tunnel
hostname: cloudflare-tunnel
restart: always
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
network_mode: "host"
command: tunnel run
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
- TUNNEL_TOKEN=${TUNNEL_TOKEN}
healthcheck:
test: ["CMD", "cloudflared", "--version"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s