forked from jpmeijers/ttn-resin-gateway-rpi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-collectd.yml
63 lines (61 loc) · 1.71 KB
/
docker-compose-collectd.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
# Docker-compose file for TTN gateway
# Includes the Collectd service
# Version 2.1 for balena compatibility
version: '2.1'
services:
# The gateway itself
gateway:
build:
context: gateway
args:
GW_MACHINE_NAME:
image: amedee/ttn-gateway
privileged: true
network_mode: host
restart: always
environment:
SERVER_TTN_CLUSTER_ID: "${SERVER_TTN_CLUSTER_ID:-eu1}"
GW_KEY: "${GW_KEY:?Gateway Key is mandatory}"
GW_ID: "${GW_ID:?Gateway Id is mandatory}"
GW_EUI: "${GW_EUI}"
GW_LOGGER: "${GW_LOGGER:-false}"
GW_PRINT_STATS: "${GW_PRINT_STATS:-true}"
GW_SPI_SPEED: "${GW_SPI_SPEED}"
GW_GPS: "${GW_GPS:-false}"
GW_RESET_PIN: "${GW_RESET_PIN:-22}"
# GW_STAT_FILE is mandatory for reporting metrics
GW_STAT_FILE: "true"
devices:
- "/dev/mem:/dev/mem"
volumes:
- var_ttn_vol:/var/ttn
# Collectd
collectd:
build:
context: collectd
args:
GW_MACHINE_NAME:
image: amedee/ttn-collectd
privileged: true
network_mode: host
restart: always
environment:
GW_COLLECTD_SERVER: "${GW_COLLECTD_SERVER}"
GW_COLLECTD_INTERVAL: "${GW_COLLECTD_INTERVAL}"
GW_BACKPLANE: "${GW_BACKPLANE}"
GW_TTN_FAN: "${GW_TTN_FAN}"
GW_BME280: "${GW_BME280:-false}"
GW_BME280_ADDR: "${GW_BME280_ADDR}"
GW_BME280_SMBUS: "${GW_BME280_SMBUS}"
volumes:
- var_ttn_vol:/var/ttn
# balenaCloud users
# Insert the fan service from the docker-compose-fan.yml file here
# to control the fan connected to the Coredump backplane
# (Plain docker users can use an override file)
volumes:
var_ttn_vol:
driver: local
driver_opts:
type: tmpfs
device: tmpfs