-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
52 lines (42 loc) Β· 2.16 KB
/
Copy path.env.example
File metadata and controls
52 lines (42 loc) Β· 2.16 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
# Storage backend: "sqlite" or "redis"
STORAGE_BACKEND=sqlite
# SQLite (used when STORAGE_BACKEND=sqlite)
SQLITE_PATH=./ghostbit.db
# Docker / production: SQLITE_PATH=/data/ghostbit.db
# Connection pool size. WAL mode lets several readers progress in parallel;
# SQLite serializes writers internally. Bump if
# `ghostbit_sqlite_pool_wait_seconds` P99 shows contention.
# SQLITE_POOL_SIZE=5
# Redis (used when STORAGE_BACKEND=redis)
REDIS_URL=redis://localhost:6379
# Optional Redis password. If set, injected into REDIS_URL automatically.
# For an external Redis that already includes credentials in the URL, leave this empty.
# REDIS_PASSWORD=
# Max paste size in bytes (default: 524288 = 512 KB)
MAX_PASTE_SIZE=524288
# Webhook signing secret (optional).
# If set, every webhook delivery includes X-Ghostbit-Signature: sha256=<HMAC-SHA256>.
# Generate with: python3 -c "import secrets; print(secrets.token_hex(32))"
# WEBHOOK_SECRET=
# Rate limits (slowapi syntax: "N/period")
RATE_LIMIT_CREATE=30/minute
RATE_LIMIT_VIEW=120/minute
# Trust X-Forwarded-For for rate limiting. Enable ONLY when behind a
# reverse proxy. The *rightmost* XFF entry is used (the IP appended by the
# nearest hop), so the proxy itself decides the rate-limit key. For multi-
# hop setups (CDN β LB β app), configure the proxy to collapse the chain
# to a single trusted entry, otherwise the rightmost IP will be the LB and
# rate limits will apply globally rather than per-client.
TRUST_PROXY_HEADERS=false
# Public base URL β scheme + host, no trailing slash (e.g. https://paste.example.com).
# Builds the absolute URLs in social-preview meta tags (og:image, og:url) so
# link-unfurl bots (iMessage, Slack, β¦) can fetch the preview image. Leave empty
# to derive it from the request β set it when a TLS-terminating proxy would
# otherwise make the app advertise http:// URLs. A bad value fails fast at startup.
# BASE_URL=
# Repo whose stargazer count the footer shows, fetched server-side once an hour.
# Leave empty to disable the outbound call entirely (air-gapped deployments) β
# the footer then just links to GitHub without a number.
# GITHUB_REPO=stackopshq/ghostbit
# Server port (default: 8000)
PORT=8000