# ============================================================================
# DYD — Deployment environment variables (TEMPLATE)
#
# Copy file này thành .env.deploy.local (đã trong .gitignore) và điền secrets.
# KHÔNG commit file .env.deploy.local vào git.
# ============================================================================

# --- VPS ---------------------------------------------------------------------
VPS_IP=103.124.94.58
VPS_USER=Administrator
# VPS_PASSWORD=...         # Không khuyến khích lưu file — nhập khi RDP

# --- DOMAINS -----------------------------------------------------------------
API_DOMAIN=api.ski-ump.com.vn
USER_DOMAIN=ski-ump.com.vn
ADMIN_DOMAIN=admin.ski-ump.com.vn

# --- SQL SERVER --------------------------------------------------------------
SQL_SERVER=103.124.94.58,1433
SQL_DATABASE=DYD_Prod

# Login admin (chỉ để SETUP lần đầu — KHÔNG dùng cho app)
# SQL_SA_USER=sa
# SQL_SA_PASSWORD=...

# Login app (tạo bằng scripts/deployment/sql/01-create-database.sql)
SQL_APP_USER=dyd_app
# SQL_APP_PASSWORD=...    # Generate: [System.Web.Security.Membership]::GeneratePassword(32,8)

# Connection string cho .NET (KHÔNG commit)
# DB_CONNECTION_STRING="Server=103.124.94.58,1433;Database=DYD_Prod;User Id=dyd_app;Password=XXX;TrustServerCertificate=True;MultipleActiveResultSets=True;"

# --- JWT ---------------------------------------------------------------------
# Generate: [Convert]::ToBase64String([byte[]]::new(48)) sau [System.Security.Cryptography.RandomNumberGenerator]::Fill($bytes)
# Hoặc online: https://generate-random.org/api-token-generator (64 char)
# JWT_SIGNING_KEY=...

# --- AI SERVICE --------------------------------------------------------------
AI_SERVICE_URL=http://localhost:4402
# AI_SERVICE_API_KEY=...  # Random hex 32: [BitConverter]::ToString((New-Object byte[] 32).Tap({[Security.Cryptography.RandomNumberGenerator]::Fill($_)})) -replace '-'

# --- GITEA -------------------------------------------------------------------
GITEA_URL=http://103.124.94.58:3000
# GITEA_ADMIN_USER=admin
# GITEA_ADMIN_PASSWORD=...    # Set qua web installer
# GITEA_RUNNER_TOKEN=...       # Lấy ở Site Admin → Actions → Runner Management

# --- EMAIL (for win-acme Let's Encrypt + SMTP future) -----------------------
ADMIN_EMAIL=admin@ski-ump.com.vn
# SMTP_HOST=smtp.sendgrid.net
# SMTP_PORT=587
# SMTP_USER=apikey
# SMTP_PASSWORD=...
