-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathoffline.toml
More file actions
72 lines (64 loc) · 2.75 KB
/
Copy pathoffline.toml
File metadata and controls
72 lines (64 loc) · 2.75 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
# Tileserver-RS Offline Configuration
# This config uses only local files - no internet required!
#
# Usage:
# 1. Download a PMTiles file (e.g., from https://protomaps.com/downloads)
# 2. Place it in ./data/tiles/ directory
# 3. Update the path below to point to your file
# 4. Run: ./target/release/tileserver-rs --config data/configs/offline.toml --ui
# Root-level configuration (must come before any [section] headers)
# Fonts directory
fonts = "./data/fonts"
# Optional: static files directory for custom overlays, icons, etc.
# files = "./data/files"
[server]
host = "0.0.0.0"
port = 8080
cors_origins = ["*"]
# admin_bind = "127.0.0.1:9099"
# ============================================================================
# OPENTELEMETRY + PROMETHEUS METRICS
# OTLP tracing/metrics push and a separate Prometheus /metrics scrape endpoint.
# Both pipelines are independent — you can enable one without the other.
# See: https://docs.tileserver.app/guides/telemetry
# ============================================================================
[telemetry]
# Enable OTLP tracing + metrics push (default: false)
enabled = false
# OTLP gRPC endpoint (only used when enabled = true)
# endpoint = "http://localhost:4317"
# service_name = "tileserver-rs"
# sample_rate = 1.0 # Trace sampling (0.0–1.0)
# metrics_enabled = true # OTLP metrics push (requires enabled = true)
# metrics_export_interval_secs = 60 # OTLP metrics push interval
#
# --- Prometheus pull-based scrape endpoint (independent of `enabled`) ---
# Spawns a separate listener task; zero cost when unset.
# Bind address for the standalone /metrics endpoint (default: disabled)
# prometheus_bind = "127.0.0.1:9100"
# HTTP path for the Prometheus exposition (default: "/metrics")
# prometheus_path = "/metrics"
# Cardinality strategy: "strict" (production-safe, default) | "verbose" (debug only)
# metrics_label_cardinality = "strict"
# Local tile source - update the path to your PMTiles file
# Download tiles from: https://protomaps.com/downloads
[[sources]]
id = "protomaps"
type = "pmtiles"
path = "./data/tiles/protomaps-sample.pmtiles"
name = "Protomaps Firenze Sample"
attribution = "<a href=\"https://protomaps.com\">Protomaps</a> | <a href=\"https://openstreetmap.org/copyright\">© OpenStreetMap</a>"
# Local style (uses the bundled style in ./styles)
[[styles]]
id = "protomaps"
path = "./data/styles/protomaps-offline/style.json"
name = "Protomaps Light"
# MLT transcoding example (requires --features mlt)
# Serves the same PMTiles source as MLT tiles via on-the-fly transcoding.
# Request: GET /data/protomaps-mlt/{z}/{x}/{y}.mlt
# [[sources]]
# id = "protomaps-mlt"
# type = "pmtiles"
# path = "./data/tiles/protomaps-sample.pmtiles"
# name = "Protomaps Firenze Sample (MLT)"
# serve_as = "mlt"