-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.yaml
More file actions
137 lines (127 loc) · 4.79 KB
/
compose.yaml
File metadata and controls
137 lines (127 loc) · 4.79 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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: telemetry-vis-software
services:
# Reverse proxy in front of everything
caddy:
image: caddy:2.8.4
restart: always
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- caddy_data:/data
- caddy_config:/config
- ./Caddyfile:/etc/caddy/Caddyfile
# Intended to only be run once, to initialize the shared telemetry_data volume.
populate-telemetry-data:
image: busybox
restart: no
volumes:
- telemetry_data:/telemetry_data
- ./fs-data:/fs-data
command: >
sh -c "
mkdir -p /telemetry_data/recordings
mkdir -p /telemetry_data/layouts
mkdir -p /telemetry_data/live
rm -rf /telemetry_data/fs-data
cp -r /fs-data /telemetry_data
"
# Nodejs process hosts react frontend
nodejs:
image: "${REGISTRY_URL:-}telemetry-vis-software/frontend:latest"
restart: always
# NOTE: in order for the build to produce a working output, .env.production
# needs to be present in the build context dir with lcjs license information.
build: ./frontend
expose:
- "3000"
# Python process runs websocket and http servers (backend)
python:
image: "${REGISTRY_URL:-}telemetry-vis-software/backend:latest"
restart: always
build: ./backend
expose:
- "8000"
- "9000"
environment:
# Directories where the api server will look for recording/layout files
# DATA_DIR: /data_dir
# LAYOUTS_DIR: /layouts_dir
DATA_DIR: /telemetry_data/recordings
LAYOUTS_DIR: /telemetry_data/layouts
volumes:
# - ./fs-data:/data_dir
# - ./layouts:/layouts_dir
- telemetry_data:/telemetry_data
# File server to store fs-data recordings
copyparty:
image: copyparty/ac
restart: always
expose:
- "3923"
volumes:
- telemetry_data:/w/telemetry_data
- ./copyparty.conf:/cfg/copyparty.conf:ro
- copyparty_config:/cfg-rw:rw
# Running this as non-root is nearly fucking impossible due to file
# permissions with bind/shared volumes. I literally give up
# user: "1000:1000"
environment:
# Changes the writable config path to a persistent docker volume.
XDG_CONFIG_HOME: "/cfg-rw"
# Ensures log-messages are not delayed (but can reduce speed a tiny bit)
PYTHONUNBUFFERED: "1"
healthcheck:
test: ["CMD-SHELL", "wget --spider -q 127.0.0.1:3923/?reset=/._"]
interval: "1m"
timeout: "2s"
retries: "5"
start_period: "15s"
# Tabular database which serves parquet recordings via SQL queries
clickhouse:
image: clickhouse/clickhouse-server
restart: always
volumes:
- ./clickhouse-config.xml:/etc/clickhouse-server/config.d/clickhouse-config.xml
- ./clickhouse-users.xml:/etc/clickhouse-server/users.d/clickhouse-users.xml
- clickhouse_data:/var/lib/clickhouse
#- ./fs-data:/var/lib/clickhouse/user_files/fs-data
- type: volume
source: telemetry_data
volume:
subpath: recordings
target: /var/lib/clickhouse/user_files
expose:
- "8123" # We ignore the TCP port 9000 for RPC, only use HTTP port 8123
# Data visualization dashboard which supports SQL queries to create dashboards
grafana:
image: grafana/grafana
restart: always
expose:
- "8001"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
#- GF_FEATURE_TOGGLES_ENABLE=newInfluxDSConfigPageDesign
- GF_SERVER_ROOT_URL=https://graf.telemetry.formulaslug.com
- GF_SERVER_HTTP_PORT=8001
- GF_DATE_FORMATS_FULL_DATE=H:mm:ss.SSS
- GF_DATE_FORMATS_INTERVAL_SECOND=H:mm:ss.SSS
- GF_DATE_FORMATS_INTERVAL_MINUTE=H:mm:ss.SSS
- GF_DATE_FORMATS_INTERVAL_HOUR=H:mm:ss.SSS
- GF_DATE_FORMATS_INTERVAL_DAY=H:mm:ss.SSS
- GF_DATE_FORMATS_INTERVAL_MONTH=H:mm:ss.SSS
- GF_DATE_FORMATS_INTERVAL_YEAR=H:mm:ss.SSS
volumes:
- grafana_data:/var/lib/grafana
volumes:
caddy_data:
caddy_config:
grafana_data:
clickhouse_data:
copyparty_config:
# Main stateful data volume, which contains layouts, parquet recordings, and live data (TBD)
telemetry_data: