-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCaddyfile
More file actions
69 lines (58 loc) · 1.83 KB
/
Caddyfile
File metadata and controls
69 lines (58 loc) · 1.83 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
# Note: containers' hostnames come from the docker compose.yaml file (the
# corresponding keyname in the `services` block)
# When running locally on localhost, Caddy will automatically use self-signed
# certs for https. Otherwise it will use the Let's Encrypt CA.
# When hosting telemetry-vis-software under another reverse proxy, http-only is
# needed. Furthermore, the local IP of that proxy should be trusted for headers
{
auto_https off
servers {
trusted_proxies static private_ranges
}
}
http://data.telemetry.formulaslug.com,
https://data.telemetry.formulaslug.com
{
reverse_proxy /* copyparty:3923
}
http://graf.telemetry.formulaslug.com,
https://graf.telemetry.formulaslug.com
{
reverse_proxy /* grafana:8001
}
http://clickhouse.telemetry.formulaslug.com,
https://clickhouse.telemetry.formulaslug.com
{
reverse_proxy /* clickhouse:8123
}
https://telemetry.formulaslug.com,
http://telemetry.formulaslug.com,
localhost
{
# Defines a named matcher for any request where "Upgrade" is _contained_ in
# the Connection header and the Upgrade header is equal to "websocket".
# Reverse proxy all matching requests to the websocket server
@websockets {
header Connection *Upgrade*
header Upgrade websocket
}
reverse_proxy @websockets python:8000
# Reverse proxy http api calls to http server
reverse_proxy /api/* python:9000
#file_server /api/browse browse
# Reverse proxy all other paths to nodejs server (frontend UI)
reverse_proxy /* nodejs:3000
}
# Useful handler methods we aren't using:
# root * /srv # not used - website comes from nodejs process
#
# Logs all HTTP request headers
# log {
# output stderr
# level info
# format json {
# time_key timestamp
# message_key message
# level_key level
# }
# }