chore(config): Binaries laden .env selbst; .env.example korrigiert
`cp .env.example .env && cargo run` — der im README dokumentierte Ablauf — schlug bisher mit `missing env: PDS_HOST` fehl: nichts im Prozess hat die Datei je gelesen. Beide Bins rufen jetzt als erstes `dotenvy::dotenv()` auf; echte Umgebungsvariablen gewinnen weiterhin. Dazu .env.example am Code verifiziert: * PDS_JWT_SECRET war weder Hex noch ein gültiger P-256-Skalar. jwt_issuer.rs macht hex::decode + p256::SecretKey::from_bytes; ein ungültiger Wert lässt den Server starten, aber jeder Pfad über server_p256_public_multibase antwortet 500 — also nicht nur create/refreshSession, sondern auch jeder Record-Write (repo.rs, feed.rs, blob.rs, profile.rs). * JETSTREAM_COLLECTIONS fehlten app.twi.post (das eigene 160-Zeichen-Lexicon) und app.bsky.actor.profile, obwohl der Indexer beide verarbeitet. * APP_ENV entfernt — wird nirgends gelesen. * PDS_INTERNAL_URL, APPVIEW_INTERNAL_URL, APPVIEW_HANDLE_SYNC_INTERVAL_SECS und die MAARCADETWEET_*-Overrides des Clients ergänzt. * S3_BUCKET_APPVIEW als das markiert, was es ist: Pflichtvariable ohne Leser. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013HC9HLrUU1LNwkzp8nkDLX
This commit is contained in:
co-authored by
Claude Opus 5
parent
baeb87214b
commit
3c6f4dd67c
+32
-5
@@ -1,26 +1,46 @@
|
||||
# =====================================================
|
||||
# maarcadetweet — environment
|
||||
# =====================================================
|
||||
# Copy to .env and adjust.
|
||||
# Copy to .env and adjust. Beide Binaries laden `.env` beim Start
|
||||
# selbst (dotenvy); echte Umgebungsvariablen haben Vorrang.
|
||||
|
||||
# --- General ---
|
||||
RUST_LOG=info,maarcadetweet=debug,sqlx=warn
|
||||
APP_ENV=dev
|
||||
|
||||
# --- PDS server ---
|
||||
PDS_HOST=127.0.0.1
|
||||
PDS_PORT=2583
|
||||
PDS_PUBLIC_URL=http://127.0.0.1:2583
|
||||
PDS_HANDLE_DNS_ZONE=.maarcadetweet.local
|
||||
PDS_JWT_SECRET=change-me-to-a-32-byte-random-string-please
|
||||
# MUSS Hex sein, >= 32 Bytes ergeben und ein gültiger P-256-Skalar
|
||||
# sein (also nicht lauter Nullen) — `jwt_issuer.rs` macht hex::decode()
|
||||
# und p256::SecretKey::from_bytes(). Ein ungültiger Wert lässt den
|
||||
# Server zwar starten, aber alles, was den Serverschlüssel ableitet,
|
||||
# antwortet mit 500: createAccount/createSession/refreshSession UND
|
||||
# jeder Record-Write (repo.rs, feed.rs, blob.rs, profile.rs).
|
||||
# Der Wert hier ist ein Zufallswert fürs Beispiel — für echte
|
||||
# Instanzen einen eigenen erzeugen:
|
||||
# openssl rand -hex 32
|
||||
PDS_JWT_SECRET=522084586f3d3abb835d43b7c4726735d78803dd58490f62a92571cd29033a95
|
||||
# Wohin die PDS ihre Commits pusht (POST /internal/ingest-commit).
|
||||
# Default: APPVIEW_PUBLIC_URL.
|
||||
# APPVIEW_INTERNAL_URL=http://127.0.0.1:2584
|
||||
|
||||
# --- AppView service ---
|
||||
APPVIEW_HOST=127.0.0.1
|
||||
APPVIEW_PORT=2584
|
||||
APPVIEW_PUBLIC_URL=http://127.0.0.1:2584
|
||||
JETSTREAM_URL=wss://jetstream1.us-east.bsky.network/subscribe
|
||||
# Collections the AppView will index
|
||||
JETSTREAM_COLLECTIONS=app.bsky.feed.post,app.bsky.feed.like,app.bsky.feed.repost,app.bsky.graph.follow
|
||||
# Collections, die die AppView indexiert. `app.twi.post` ist das
|
||||
# eigene 160-Zeichen-Lexicon und muss mit rein, sonst tauchen eigene
|
||||
# Posts nur über den PDS-Push auf; `app.bsky.actor.profile` füttert
|
||||
# den Profil-Cache.
|
||||
JETSTREAM_COLLECTIONS=app.twi.post,app.bsky.feed.post,app.bsky.feed.like,app.bsky.feed.repost,app.bsky.graph.follow,app.bsky.actor.profile
|
||||
# Für den Handle-Sync-Worker: welche PDS nach lokalen Handles gefragt
|
||||
# wird. Default: PDS_PUBLIC_URL.
|
||||
# PDS_INTERNAL_URL=http://127.0.0.1:2583
|
||||
# Intervall des Handle-Sync-Workers in Sekunden (Default: 300).
|
||||
# APPVIEW_HANDLE_SYNC_INTERVAL_SECS=60
|
||||
|
||||
# --- Databases ---
|
||||
DATABASE_URL_PDS=postgres://pds:pds@127.0.0.1:5434/pds
|
||||
@@ -32,6 +52,9 @@ S3_REGION=us-east-1
|
||||
S3_ACCESS_KEY=minioadmin
|
||||
S3_SECRET_KEY=minioadmin
|
||||
S3_BUCKET_PDS=maarcadetweet-pds
|
||||
# Pflichtvariable in AppConfig::from_env(), wird derzeit von keinem
|
||||
# Code-Pfad gelesen — muss gesetzt sein, damit der Start nicht
|
||||
# fehlschlägt.
|
||||
S3_BUCKET_APPVIEW=maarcadetweet-appview
|
||||
|
||||
# --- PLC Directory (dev: leave default; can mock) ---
|
||||
@@ -40,3 +63,7 @@ PLC_DIRECTORY_URL=https://plc.directory
|
||||
|
||||
# --- AppView ingest auth (optional, dev ok if unset) ---
|
||||
# APPVIEW_INGEST_SECRET=change-me-to-a-shared-secret-between-pds-and-appview
|
||||
|
||||
# --- Tauri-Client (Build-/Laufzeit-Overrides des Desktop-Clients) ---
|
||||
# MAARCADETWEET_PDS_URL=http://127.0.0.1:2583
|
||||
# MAARCADETWEET_APPVIEW_URL=http://127.0.0.1:2584
|
||||
|
||||
Reference in New Issue
Block a user