Skip to content
Open
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
78 changes: 16 additions & 62 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,70 +1,24 @@
# Copy this file to .env and replace placeholder values.
# =============================================
# R.E.D.T.I.E - Superuser Discord Intelligence
# =============================================

# Discord Bot Configuration
# Discord Bot
DISCORD_TOKEN=your_discord_bot_token_here
CLIENT_ID=your_discord_client_id_here
# Your server ID (used in the setup tutorial; slash commands register globally via CLIENT_ID).
GUILD_ID=your_discord_guild_id_here
OWNER_IDS=your_discord_id_here (optional)

# Bot Runtime Configuration
NODE_ENV=production
LOG_LEVEL=warn
LOG_TO_FILE=false
SENTRY_DSN=

# Web/API Configuration
PORT=3000
WEB_HOST=0.0.0.0
PORT_RETRY_ATTEMPTS=5
CORS_ORIGIN=*

# PostgreSQL Configuration (Primary Database)
# Railway: use the private POSTGRES_URL / DATABASE_URL variable (includes SSL).
# Public proxy logs showing "invalid length of startup packet" or "SSL without ALPN"
# are usually internet scanners — not your bot.
POSTGRES_URL=postgresql://postgres:yourpassword@localhost:5432/titanbot
POSTGRES_SSL=
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=titanbot
POSTGRES_USER=postgres
POSTGRES_PASSWORD=yourpassword
# Database (Supabase or PostgreSQL)
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_anon_key
POSTGRES_URL=postgresql://user:password@localhost:5432/redtie

# PostgreSQL Pool/Timeout Settings
POSTGRES_MAX_CONNECTIONS=20
POSTGRES_MIN_CONNECTIONS=2
POSTGRES_CONNECTION_TIMEOUT=10000
POSTGRES_IDLE_TIMEOUT=30000
POSTGRES_RETRIES=3
POSTGRES_BACKOFF_BASE=100
POSTGRES_BACKOFF_MULTIPLIER=2
# AI Services
GROQ_API_KEY=your_groq_api_key_here
HF_TOKEN=your_huggingface_token_here

# Migration & Schema Settings
AUTO_MIGRATE=true
POSTGRES_MIGRATION_TABLE=schema_migrations
SCHEMA_VERSION=1
SCHEMA_VERSION_LABEL=baseline-v1
# Lavalink Music
LAVALINK_NODES=[{"host":"lava.link","port":80,"password":"password","secure":false}]

# Backup/Restore Script Settings
BACKUP_DIR=./backups
BACKUP_RETENTION_DAYS=14
POSTGRES_RESTORE_URL=

# Music (Lavalink + Riffy) — requires Lavalink v4 nodes
# Default: loads public v4 SSL nodes from lavalink/nodes.json
# Source: https://lavalink.darrennathanael.com/SSL/Lavalink-SSL/
# LAVALINK_NODES_FILE=lavalink/nodes.json
# Optional: override nodes as JSON array (takes priority over nodes file)
# LAVALINK_NODES=[{"host":"lavalink","port":2333,"password":"youshallnotpass","secure":false,"name":"Main"}]
# Self-hosted single node fallback (used only if nodes file/env array are absent):
# LAVALINK_HOST=localhost
# LAVALINK_PORT=2333
# LAVALINK_PASSWORD=youshallnotpass
# LAVALINK_SECURE=false
# LAVALINK_NAME=Main
LAVALINK_SEARCH_PLATFORM=ytmsearch
LAVALINK_REST_VERSION=v4

# Optional Feature/API Keys
TMDB_API_KEY=
# Optional
NODE_ENV=production
LOG_LEVEL=warn
Loading