Add Ping backend

.NET 10 solution for Ping, a Discord style chat app: Domain, Application
and Infrastructure projects plus the Api host. SignalR for chat and
presence, LiveKit for call tokens, EF Core on Postgres, S3 compatible
storage for attachments, and OIDC auth shared with the Musify Zitadel
instance. Includes the Compose stack for local development.
This commit is contained in:
2026-09-21 19:32:55 +02:00
commit 0623875dfa
126 changed files with 5048 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
# Development configuration for deploy/compose.yml + compose.dev.yml.
# Copy to deploy/.env and adjust. Not versioned.
#
# cp deploy/.env.example deploy/.env
DOTNET_ENVIRONMENT=Development
# --- Public URLs -------------------------------------------------------------
PUBLIC_WEB_URL=http://localhost:3100
PUBLIC_API_URL=http://localhost:5211
# Ping reuses the Zitadel and SeaweedFS instances already running for Musify instead of
# spinning up its own, so this must match Musify's PUBLIC_AUTH_URL exactly.
PUBLIC_AUTH_URL=http://host.docker.internal:8080
# --- PostgreSQL (Ping's own database — Zitadel keeps using Musify's) --------
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=ping_db
POSTGRES_HOST_PORT=59010
# --- Zitadel (shared with Musify) --------------------------------------------
# zitadel-init needs Musify's admin service-account PAT to create Ping's own project/apps
# in that same Zitadel instance. Point this at Musify's deploy/zitadel/.output folder —
# adjust if your Musify checkout lives somewhere else relative to this one.
ZITADEL_ADMIN_PAT_DIR=../../../Musify/MusifyM/deploy/zitadel/.output
ZITADEL_DEV_MODE=true
# OIDC clients: the zitadel-init one-shot service (see compose.yml) fills these in
# automatically on `docker compose up -d`.
AUTH_CLIENT_ID=
WEB_CLIENT_ID=
# --- SeaweedFS (S3, shared with Musify) --------------------------------------
# Same SeaweedFS instance as Musify, so these must be the REAL values from Musify's own
# deploy/.env (S3_ACCESS_KEY / S3_SECRET_KEY) — not the placeholders below.
S3_ACCESS_KEY=admin_access_key
S3_SECRET_KEY=admin_secret_key
S3_BUCKET=ping-storage
S3_PUBLIC_URL=http://host.docker.internal:8333
S3_USE_HTTP=true
# --- LiveKit (voice/video SFU) ------------------------------------------------
# Overrides --dev's built-in "devkey/secret" pair (see compose.yml's LIVEKIT_KEYS): the
# LiveKit .NET server SDK rejects secrets shorter than 256 bits. Generate your own with:
# $b = [byte[]]::new(32); [System.Security.Cryptography.RandomNumberGenerator]::Create().GetBytes($b); [Convert]::ToBase64String($b)
LIVEKIT_API_KEY=devkey
LIVEKIT_API_SECRET=9U1eDtZx9eQrSWern4UcWa3lYIrfvrQqExLlkUXpP+o=
# --- Misc --------------------------------------------------------------------
AUTH_REQUIRE_HTTPS=false