Repository navigation
Expand file tree
/
Copy pathconfig.toml.example
More file actions
88 lines (79 loc) · 3.21 KB
/
Copy pathconfig.toml.example
File metadata and controls
88 lines (79 loc) · 3.21 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
# =============================================================================
# RWF (Rust Web Fullstack) — canonical configuration file
# =============================================================================
#
# Activate by copying to config.toml at the workspace root:
#
# cp config.toml.example config.toml
#
# The loader reads config.toml from the current working directory, or from
# the path in the RWF_CONFIG environment variable:
#
# RWF_CONFIG=/etc/rwf/config.toml cargo run --bin live-search
#
# Every key can be overridden at runtime via an RWF_* environment variable.
# The double-underscore __ separates nested section keys:
#
# RWF_GATEWAY__PORT=4000
# RWF_GATEWAY__SSE_BROADCAST_BUFFER=512
# RWF_GATEWAY__REFRESH_TOKEN_TTL_SECS=2592000
# RWF_LIVE_SEARCH__DATABASE_URL=postgres://user:pass@host/db
# RWF_LIVE_SEARCH__POOL_MAX_CONNECTIONS=50
# RWF_LIVE_SEARCH__SSE_BROADCAST_BUFFER=512
# RWF_GATEWAY__CORS__ALLOWED_ORIGINS=https://example.com
# RWF_GATEWAY__SESSION__COOKIE_SECURE=false
# RWF_OTEL__ENDPOINT=https://otlp.example.com:4317
#
# Resolution order (highest priority wins):
# 1. RWF_* environment variables
# 2. config.toml (or RWF_CONFIG path)
# 3. Defaults baked into the Config structs
#
# Omitting the file entirely is fine — all keys have defaults.
# =============================================================================
# Gateway server configuration
# Environment: RWF_GATEWAY__PORT, RWF_GATEWAY__PROXY_UPSTREAM_URL
[gateway]
port = 3001
proxy_upstream_url = "https://ipapi.co"
# Buffer size for the gateway's SSE broadcast channel. Increase if many
# concurrent EventSource consumers are expected.
# Environment: RWF_GATEWAY__SSE_BROADCAST_BUFFER
sse_broadcast_buffer = 256
# Lifetime of newly-issued refresh tokens, in seconds. The historical
# default is 30 days (2_592_000 s).
# Environment: RWF_GATEWAY__REFRESH_TOKEN_TTL_SECS
refresh_token_ttl_secs = 2592000
# CORS allowlist
# Environment: RWF_GATEWAY__CORS__ALLOWED_ORIGINS
[gateway.cors]
allowed_origins = "http://localhost:3000,http://localhost:3001,http://localhost:3002"
# Session cookie settings
# Environment: RWF_GATEWAY__SESSION__COOKIE_SECURE
[gateway.session]
cookie_secure = true
# Live-search binary configuration
# Environment: RWF_LIVE_SEARCH__PORT, RWF_LIVE_SEARCH__DATABASE_URL
[live_search]
port = 3000
database_url = "postgres://rwf:rwf_dev_password@localhost:5432/rwf_demo"
# Database connection pool tunables — all overridable via
# RWF_LIVE_SEARCH__POOL_*. At all times one pool connection is held by
# the PgListener task; total request-handler capacity is
# pool_max_connections - 1 under load.
# Environment: RWF_LIVE_SEARCH__POOL_MAX_CONNECTIONS / __POOL_MIN_CONNECTIONS / etc.
pool_max_connections = 20
pool_min_connections = 2
pool_acquire_timeout_secs = 5
pool_idle_timeout_secs = 600
pool_max_lifetime_secs = 1800
# Buffer size for the live-search SSE broadcast channel. Same semantics
# as gateway.sse_broadcast_buffer.
# Environment: RWF_LIVE_SEARCH__SSE_BROADCAST_BUFFER
sse_broadcast_buffer = 256
# OpenTelemetry exporter endpoint
# Set to a gRPC endpoint (e.g. "https://otlp.example.com:4317") to enable
# OTLP exports. Empty or absent = no OTLP export.
# Environment: RWF_OTEL__ENDPOINT
[otel]
endpoint = ""