Some checks failed
CI / Typecheck & Lint (pull_request) Failing after 0s
- Add .env.example documenting LNBITS_URL and LNBITS_API_KEY (and all other required env vars) so operators know exactly what to set after running infrastructure/lnd-init.sh on the droplet. - Expose lnbits_stub and lnbits_url in GET /api/healthz so operators can immediately verify whether the API is connected to a real Lightning node or running in simulated stub mode. - Emit a loud WARN log at production startup when LNBITS_URL / LNBITS_API_KEY are absent, pointing to lnd-init.sh for setup. Infrastructure scripts (setup.sh, lnd-init.sh, sweep.sh, ops.sh, docker-compose.yml) already cover the full provisioning flow; this change closes the API-side configuration gap. Fixes #12 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
60 lines
3.1 KiB
Plaintext
60 lines
3.1 KiB
Plaintext
# ============================================================
|
|
# Timmy API Server — Environment Variables
|
|
# Copy this file to .env and fill in your values.
|
|
# Never commit .env to version control.
|
|
# ============================================================
|
|
|
|
# ── Server ───────────────────────────────────────────────────
|
|
PORT=8080
|
|
NODE_ENV=development
|
|
|
|
# ── Lightning / LNbits ───────────────────────────────────────
|
|
# Set both variables to connect the API to a real Lightning node.
|
|
# Leave blank to run in stub mode (invoices simulated in-memory).
|
|
#
|
|
# After running infrastructure/lnd-init.sh on the droplet, it will
|
|
# print both values. Copy them here.
|
|
#
|
|
# LNBITS_URL is the public HTTPS URL exposed via Tailscale Funnel,
|
|
# e.g. https://<node-name>.tail12345.ts.net
|
|
LNBITS_URL=
|
|
LNBITS_API_KEY=
|
|
|
|
# ── Database ─────────────────────────────────────────────────
|
|
DATABASE_URL=postgresql://localhost:5432/timmy
|
|
|
|
# ── Nostr identity ───────────────────────────────────────────
|
|
# nsec for Timmy's Nostr keypair (signs relay events).
|
|
# Generate with: openssl rand -hex 32
|
|
TIMMY_NOSTR_NSEC=
|
|
# Optional: override the derived pubkey explicitly (hex, not npub).
|
|
TIMMY_NOSTR_PUBKEY=
|
|
|
|
# ── AI integrations ──────────────────────────────────────────
|
|
# Anthropic Claude — leave blank to use canned AI stub responses.
|
|
AI_INTEGRATIONS_ANTHROPIC_API_KEY=
|
|
|
|
# Gemini (optional)
|
|
GEMINI_API_KEY=
|
|
|
|
# ── CORS ─────────────────────────────────────────────────────
|
|
# Comma-separated list of allowed origins in production.
|
|
# Default: alexanderwhitestone.com variants.
|
|
# Leave blank to allow all origins (development default).
|
|
# CORS_ORIGINS=https://alexanderwhitestone.com,https://www.alexanderwhitestone.com
|
|
|
|
# ── Relay policy ─────────────────────────────────────────────
|
|
# Shared secret between the API server and the strfry relay-policy sidecar.
|
|
RELAY_POLICY_SECRET=
|
|
|
|
# ── Rate limiting / misc ─────────────────────────────────────
|
|
# Milliseconds between moderation poll cycles (default: 30000).
|
|
# MODERATION_POLL_MS=30000
|
|
|
|
# ── BTC price oracle ─────────────────────────────────────────
|
|
# Optional CoinGecko API key for higher rate limits.
|
|
# COINGECKO_API_KEY=
|
|
|
|
# ── Replit (auto-set in Replit environment) ──────────────────
|
|
# REPLIT_DEV_DOMAIN=<auto-set by Replit>
|