-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
122 lines (115 loc) · 4.42 KB
/
docker-compose.yaml
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
version: '3'
services:
slruntime:
image: slframework/applauncher-runtime:${APPLAUNCHER_RUNTIME_VERSION:-latest} # pulls from https://hub.docker.com/repository/docker/slframework/sideload-runtime
volumes:
- /tmp:/tmp # needed to share files with slruntime-runner containers
- ./conf/slruntime/settings.dft.yaml:/usr/src/app/config/settings.dft.yaml:ro
- ./conf/slruntime/appsettings.dft.yaml:/usr/src/app/config/appsettings.dft.yaml:ro
- ./provision/slruntime/docker-entrypoint.sh:/usr/src/app/docker-entrypoint.sh:ro
# access to docker service on host
- /var/run/docker.sock:/var/run/docker.sock
environment:
- RTCONF_HOST=${MQTT_SERVER}
- RTCONF_PORT=${MQTT_SERVER_PORT}
- RTCONF_SECRETS_FILE=/usr/src/app/config/.secrets.yaml # write mqtt user and pass to this file
- RTCONF_MQTT_USER=${MQTT_USER}
- RTCONF_MQTT_PWD=${MQTT_PWD}
command: ./docker-entrypoint.sh
restart: unless-stopped # service will respawn unless we tell docker to stop it
dashboard:
build:
# NOTE: dashboard config is only reflected when container is built
context: dashboard
dockerfile: Dockerfile
args:
#- DCONF_PUBSUBURL='${MQTT_WEBHOST}\/${MQTT_WEBHOST_PATH}\/' # must be a valid sed expression
- DCONF_PUBSUBUSERNAME='${MQTT_USER}'
- DCONF_PUBSUBPASSWORD='${MQTT_PWD}'
volumes:
- ./conf/nginx.conf.template:/etc/nginx/templates/default.conf.template
environment:
- CORS_DOMAIN_REGEX=.*
# escape var for $ in envsubst templates
- ESC=$$
ports:
- ${DASHBOARD_PORT:-8000}:80
# depends_on:
# - influxdb
restart: unless-stopped
influxdb:
image: influxdb:2.4-alpine
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=${DOCKER_INFLUXDB_INIT_USERNAME}
- DOCKER_INFLUXDB_INIT_PASSWORD=${DOCKER_INFLUXDB_INIT_PASSWORD}
- DOCKER_INFLUXDB_INIT_ORG=${DOCKER_INFLUXDB_INIT_ORG}
- DOCKER_INFLUXDB_INIT_BUCKET=${DOCKER_INFLUXDB_INIT_BUCKET}
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${DOCKER_INFLUXDB_INIT_ADMIN_TOKEN}
#ports:
# - 18086:8086 # Initial setup, automate and remove later
volumes:
- influxdb_data:/var/lib/influxdb
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "2"
restart: unless-stopped
# telegraf:
# image: telegraf
# environment:
# - DOCKER_INFLUXDB_INIT_ORG=${DOCKER_INFLUXDB_INIT_ORG}
# - DOCKER_INFLUXDB_INIT_BUCKET=${DOCKER_INFLUXDB_INIT_BUCKET}
# - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${DOCKER_INFLUXDB_INIT_ADMIN_TOKEN}
# #- MQTT_SERVER="tcp://${MQTT_SERVER}:${MQTT_SERVER_PORT}" # non ssl connection
# - MQTT_SERVER="ssl://${MQTT_SERVER}:${MQTT_SERVER_PORT}" # ssl connection
# - MQTT_TOPIC=${MQTT_TOPIC}
# - MQTT_CLIENTID=${MQTT_CLIENTID:-influx_metric_logger}
# - MQTT_USER=${MQTT_USER}
# - MQTT_PWD=${MQTT_PWD}
# depends_on:
# - influxdb
# volumes:
# - ./conf/telegraf:/etc/telegraf/:ro
# - ./provision/telegraf/docker-entrypoint.sh:/docker-entrypoint.sh:ro
# links:
# - influxdb
# command: ./docker-entrypoint.sh
# restart: unless-stopped
grafana:
image: grafana/grafana-oss:9.1.6 # alpine is default
depends_on:
- influxdb
user: "472"
environment:
- TZ=${TZ}
- GF_INSTALL_PLUGINS=${GF_INSTALL_PLUGINS}
- GF_SERVER_ROOT_URL=${GF_SERVER_ROOT_URL}
- GF_SERVER_SERVE_FROM_SUB_PATH=true
- GF_SECURITY_ADMIN_USER=${GF_SECURITY_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${DOCKER_INFLUXDB_INIT_ADMIN_TOKEN}
- GF_SECURITY_ALLOW_EMBEDDING=true
- GF_AUTH_ANONYMOUS_ENABLED=true # TODO: provision viewer user w/ reverse proxy + auth headers
- GF_AUTH_ANONYMOUS_ORG_NAME=Main Org.
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
- GF_AUTH_ANONYMOUS_HIDE_VERSION=true
- GF_USERS_DEFAULT_THEME=light
volumes:
- grafana_data:/var/lib/grafana
- ./provision/grafana/provisioning/:/etc/grafana/provisioning/
- ./provision/dashboards/:/var/lib/grafana/dashboards/
links:
- influxdb
#ports:
# - 13000:3000
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "2"
restart: unless-stopped
volumes:
influxdb_data:
grafana_data: