homelab_automation/.env.example
Bruno Charest 984d06a223
Some checks failed
Tests / Backend Tests (Python) (3.10) (push) Has been cancelled
Tests / Backend Tests (Python) (3.11) (push) Has been cancelled
Tests / Backend Tests (Python) (3.12) (push) Has been cancelled
Tests / Frontend Tests (JS) (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / All Tests Passed (push) Has been cancelled
feat: Implement comprehensive database schema with new models, CRUD operations, and documentation for host metrics, Docker management, and terminal sessions, while removing old test files.
2026-03-05 10:16:13 -05:00

123 lines
3.7 KiB
Plaintext

# ======================================================
# Homelab Automation Dashboard — Environment Variables
# ======================================================
# Copy this file to .env and fill in the values.
# DO NOT commit the .env file with real credentials!
# --- GENERAL ---
TZ="America/Montreal"
DEBUG_MODE=NO
# Utiliser le mode de debug (YES/NO)
DEBUG_MODE=YES
# ----------------
# --- API AUTHENTICATION ---
# REQUIRED: Set a strong, unique API key
# Generate a random API key using: python -c "import secrets; print(secrets.token_hex(32))"
API_KEY=CHANGE_ME_TO_A_STRONG_API_KEY
# ---------------------------
# --- JWT AUTHENTICATION ---
# REQUIRED: Set a strong secret key (min 32 chars)
# Generate a random JWT secret key using: python -c "import secrets; print(secrets.token_hex(32))"
JWT_SECRET_KEY=CHANGE_ME_TO_A_STRONG_SECRET_KEY_MIN_32_CHARS
JWT_EXPIRE_MINUTES=60
# ---------------------------
# --- DATABASE ---
# Database engine mysql ou sqlite
DB_ENGINE=mysql
# Database SQLite
# DATABASE_URL=sqlite+aiosqlite:///./data/homelab.db
# DB_PATH=./data/homelab.db
# Database MySQL
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_DATABASE=homelab
MYSQL_USER=homelab
MYSQL_PASSWORD=CHANGE_ME
MYSQL_ROOT_PASSWORD=CHANGE_ME
# Auto migration (true/false)
DB_AUTO_MIGRATE=true
# Database MySQL
DATABASE_URL=mysql+aiomysql://user:password@localhost:3306/homelab
DB_PATH=./data/homelab.db
# ---------------------------
# --- LOGS ---
LOGS_DIR=./logs/Server_log
DIR_LOGS_TASKS=./logs/tasks_logs
# ---------------------------
# --- ANSIBLE ---
ANSIBLE_INVENTORY=./ansible/inventory
ANSIBLE_PLAYBOOKS=./ansible/playbooks
ANSIBLE_GROUP_VARS=./ansible/inventory/group_vars
# ANSIBLE_CONFIG=/path/to/ansible.cfg
# ---------------------------
# --- SSH ---
# Utilisateur SSH pour les connexions
SSH_USER=automation
# Utilisateur sur le remote SSH pour les connexions
SSH_REMOTE_USER=automation
# Dossier des clés SSH
SSH_KEY_DIR=~/.ssh
# Chemin de la clé SSH
SSH_KEY_PATH=~/.ssh/id_automation_ansible
# ---------------------------
# --- CORS ---
# Comma-separated list of allowed origins (no wildcard in production!)
CORS_ORIGINS=http://localhost:3000,http://localhost:8008
# ---------------------------
# --- NOTIFICATIONS (ntfy) ---
# URL de base du serveur ntfy (self-hosted ou ntfy.sh)
NTFY_BASE_URL=https://ntfy.sh
# Topic par défaut pour les notifications générales
NTFY_DEFAULT_TOPIC=homelab-events
# Activer/désactiver les notifications (true/false)
NTFY_ENABLED=true
# envoyer toutes notifications(ALL) // erreurs(ERR) // warning(WARN)
# ex: NTFY_MSG_TYPE=ERR,WARN
# ex: NTFY_MSG_TYPE=ERR
# ex: NTFY_MSG_TYPE=ALL
NTFY_MSG_TYPE=ERR
# Timeout pour les requêtes HTTP vers ntfy (en secondes)
NTFY_TIMEOUT=5
# Authentification ntfy if needed (username et password ou token)
# NTFY_USERNAME=
# NTFY_PASSWORD=CHANGE_ME
# NTFY_TOKEN=CHANGE_ME
# ---------------------------
# --- TERMINAL SSH WEB ---
# Session TTL in minutes (default: 30)
TERMINAL_SESSION_TTL_MINUTES=30
# ttyd interface
TERMINAL_TTYD_INTERFACE=eth0
# Maximum active sessions per user (default: 3)
TERMINAL_MAX_SESSIONS_PER_USER=3
# Idle timeout - sessions without heartbeat for this long are closed (default: 120s)
TERMINAL_SESSION_IDLE_TIMEOUT_SECONDS=120
# Heartbeat interval - how often client should send heartbeat (default: 15s)
TERMINAL_HEARTBEAT_INTERVAL_SECONDS=15
# GC interval - how often to run garbage collection (default: 30s)
TERMINAL_GC_INTERVAL_SECONDS=30
# Port range for ttyd instances (default: 7680-7700)
TERMINAL_PORT_RANGE_START=7682
TERMINAL_PORT_RANGE_END=7699
# SSH user for terminal connections (default: automation)
TERMINAL_SSH_USER=automation
# Retention period for terminal command history (default: 30 days)
TERMINAL_COMMAND_RETENTION_DAYS=30
# ---------------------------