Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 0 additions & 115 deletions .env.example

This file was deleted.

70 changes: 62 additions & 8 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,9 +1,63 @@
PORT=<PORT>
SMB_ADDRESS=<SMB_ADDRESS>
SMB_APIKEY=<SMB_APIKEY>
WHIP_AUTH_KEY=<WHIP_AUTH_KEY>
DB_CONNECTION_STRING=<DB_CONNECTION_STRING>
PUBLIC_HOST=<PUBLIC_HOST>
OSC_ACCESS_TOKEN=<OSC_ACCESS_TOKEN>
ICE_SERVERS=turn:username:password@turn.example.com,stun:stun.example.com
# Copy to `.env` and adjust. Values below are placeholders, not real secrets.

# --- Required ---

# Base URL of the Symphony Media Bridge (SMB) REST API.
SMB_ADDRESS=http://localhost:8080
# DB connection string; mongodb(+srv) or http(s) (CouchDB). Startup fails without it.
DB_CONNECTION_STRING=mongodb://localhost:27017/intercom-manager

# --- Optional (defaults shown) ---

# Port the Fastify server listens on.
PORT=8000
# Public base URL used to build absolute links (e.g. WHIP endpoints).
PUBLIC_HOST=http://localhost:8000
# Legacy alias for DB_CONNECTION_STRING; used only if that one is unset.
MONGODB_CONNECTION_STRING=mongodb://localhost:27017/intercom-manager
# API key for the SMB REST API; leave empty if SMB requires none.
SMB_APIKEY=
# Idle timeout (seconds) before SMB endpoints are torn down.
ENDPOINT_IDLE_TIMEOUT_S=60
# Comma-separated ICE servers, e.g. turn:user:pass@turn.example.com,stun:stun.example.com
ICE_SERVERS=
# Comma-separated allowed CORS origins; unset = not restricted to an origin.
CORS_ORIGIN=http://localhost:5173,http://localhost:5174
# Comma-separated origins allowed to make state-mutating requests; unset = no CSRF check.
CSRF_TRUSTED_ORIGINS=

# --- Roles & permissions (#123) ---

# Role passwords exchanged for a role via POST /api/v1/permissions; unset = role unavailable.
ROLE_ADMIN_PASSWORD=
ROLE_EDITOR_PASSWORD=
ROLE_PARTICIPANT_PASSWORD=
# "true" requires `Authorization: Bearer <role-password>` on all requests.
REQUIRE_AUTH=false

# --- WHIP ingest ---

# Shared auth key WHIP clients must present to publish.
WHIP_AUTH_KEY=
# Warm-up grace period (ms) before a new WHIP endpoint counts as active.
WHIP_WARMUP_MS=15000
# How long (ms) a WHIP endpoint may stay inactive before expiring.
WHIP_INACTIVE_ALLOW_MS=10000
# How long (ms) an absent WHIP endpoint is tolerated before expiring.
WHIP_ABSENCE_ALLOW_MS=30000
# Retries before expiring a WHIP endpoint.
WHIP_EXPIRE_RETRIES=3
# Consecutive missed checks before expiring a WHIP endpoint.
WHIP_EXPIRE_CONSECUTIVE_MISSES=3

# --- Eyevinn Open Source Cloud (OSC) ---

# OSC personal access token used for share/re-auth features.
OSC_ACCESS_TOKEN=
# OSC environment to target.
OSC_ENVIRONMENT=prod

# --- Logging ---

# Any truthy value enables debug-level logging.
DEBUG=
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
node_modules/
.DS_Store
.env
!.env.example

.terraform/
*.tfstate
Expand Down
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function validateRequiredEnv(): void {
// A database connection string is required; no hardcoded localhost fallback is
// provided so that a missing value fails fast at startup rather than silently
// connecting to a local MongoDB. Local development supplies the localhost
// default via .env/.env.example/docker-compose, not in production code.
// default via .env/.env.sample/docker-compose, not in production code.
if (
!process.env.DB_CONNECTION_STRING &&
!process.env.MONGODB_CONNECTION_STRING
Expand Down
Loading