From 7e0839d8cd5b7f05e15b1f0f69b61c6a883061a4 Mon Sep 17 00:00:00 2001 From: NW Date: Wed, 17 Jun 2026 20:32:26 +0100 Subject: [PATCH] chore: add .env.example template and expand .gitignore for secrets - Add .env.example with all config vars (no real secrets) - Exclude .env, .env.*, docker-compose.override.yml - Exclude wg/ (WireGuard configs with private keys) - Exclude dump/, dump.zip, *.csv (sensitive exports) - Keep .env.example tracked (!.env.example exception) --- .env.example | 42 ++++++++++++++++++++++++++++++++++++++++++ .gitignore | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..b82142e --- /dev/null +++ b/.env.example @@ -0,0 +1,42 @@ +# ============================================================ +# Telegram Shop - Environment Configuration (TEMPLATE) +# ============================================================ +# Копируй этот файл в .env и заполни реальными значениями. +# ВНИМАНИЕ: .env файлы НЕ коммитятся — они в .gitignore. +# ============================================================ + +# --- Telegram Bot --- +BOT_TOKEN=your_bot_token_here +ADMIN_IDS=123456789,987654321 +SUPPORT_LINK=https://t.me/your_support + +# --- Catalog --- +CATALOG_PATH=./catalog + +# --- Encryption (ОБЯЗАТЕЛЬНО! Без этого приложение упадёт) --- +# Сгенерируй надёжный ключ: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" +ENCRYPTION_KEY= + +# --- Commission --- +COMMISSION_ENABLED=true +COMMISSION_PERCENT=5 + +# --- Commission Wallets --- +COMMISSION_WALLET_BTC= +COMMISSION_WALLET_LTC= +COMMISSION_WALLET_USDT= +COMMISSION_WALLET_USDC= +COMMISSION_WALLET_ETH= + +# --- WireGuard --- +WG_ENABLED=false +WG_PRIVATE_KEY= +WG_PUBLIC_KEY= +WG_PRESHARED_KEY= +WG_ENDPOINT= +WG_ADDRESS= +WG_DNS= + +# --- Gitea API (для CI/CD и пайплайна) --- +GITEA_API_URL=https://git.softuniq.eu/api/v1 +GITEA_TOKEN= \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5baa59d..6060681 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,41 @@ -db \ No newline at end of file +# Dependencies +node_modules/ + +# Environment +.env +.env.* +!.env.example + +# Secrets & sensitive data +docker-compose.override.yml +wg/ +dump/ +dump.zip +*.csv + +# Database +db/ +*.db + +# Logs +*.log + +# OS +.DS_Store + +# Kilo generated files (auto-created, not tracked) +.kilo/logs/ +.kilo/reports/ +.kilo/EVOLUTION_LOG.md +.kilo/WORKFLOW_AUDIT.md + +# Local workspace / worktrees +.work/ + +# Architect generated maps +.architect/maps/.work/ + +# Python cache +__pycache__/ +*.pyc +*.pyo \ No newline at end of file