# .env.template (สำหรับ QNAP / Gitea Runner)
# คัดลอกไฟล์นี้ไปเป็น .env ในโฟลเดอร์เดียวกับ docker-compose-app.yml

# ---------------------------------------------------------
# 1. Backend Service Configuration
# ---------------------------------------------------------
TZ=Asia/Bangkok
NODE_ENV=production
PORT=3000

# --- Database (MariaDB) ---
DB_HOST=mariadb
DB_PORT=3306
DB_DATABASE=lcbp3
DB_USERNAME=center
DB_PASSWORD=Center#2025

# --- Redis (Cache & Queue) ---
REDIS_HOST=cache
REDIS_PORT=6379
REDIS_PASSWORD=Center2025

# --- Search (Elasticsearch) ---
ELASTICSEARCH_HOST=search
ELASTICSEARCH_PORT=9200

# --- Security (JWT) ---
JWT_SECRET=eebc122aa65adde8c76c6a0847d9649b2b67a06db1504693e6c912e51499b76e
JWT_EXPIRATION=8h
JWT_REFRESH_SECRET=a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2

# --- Numbering Logic ---
NUMBERING_LOCK_TIMEOUT=5000
NUMBERING_RESERVATION_TTL=300

# --- File Storage ---
UPLOAD_TEMP_DIR=/app/uploads/temp
UPLOAD_PERMANENT_DIR=/app/uploads/permanent
MAX_FILE_SIZE=52428800

# ---------------------------------------------------------
# 2. Frontend Service Configuration
# ---------------------------------------------------------
NEXT_PUBLIC_API_URL=https://backend.np-dms.work/api
AUTH_URL=https://lcbp3.np-dms.work

# --- NextAuth ---
AUTH_SECRET=eebc122aa65adde8c76c6a0847d9649b2b67a06db1504693e6c912e51499b76e
AUTH_TRUST_HOST=true

# --- Shared Context ---
INTERNAL_API_URL=http://backend:3000/api
HOSTNAME=0.0.0.0
