-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
145 lines (122 loc) · 5.9 KB
/
Copy path.env.example
File metadata and controls
145 lines (122 loc) · 5.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# ==============================================================================
# ZEE-INDEX CONFIGURATION TEMPLATE
# ==============================================================================
# Copy this file: cp .env.example .env
# Then fill in your values below.
# ------------------------------------------------------------------------------
# 1. CORE APPLICATION SETTINGS
# ------------------------------------------------------------------------------
NEXTAUTH_URL="http://localhost:3000"
# Generate with: openssl rand -base64 32
NEXTAUTH_SECRET=""
SHARE_SECRET_KEY=""
# Admin email(s) — comma-separated for multiple admins
ADMIN_EMAILS="admin@example.com"
# Admin login password.
# Prefer bcrypt hash for production:
# node -e "require('bcryptjs').hash('your-password',10).then(console.log)"
# ADMIN_PASSWORD_HASH="$2a$10$..."
# Plaintext ADMIN_PASSWORD still works for local/dev (min 8 chars).
ADMIN_PASSWORD="your-secure-password"
# ADMIN_PASSWORD_HASH=""
# --- ALTERNATIVE STORAGE PROVIDERS (S3 / R2 / WebDAV) ---
# Set STORAGE_PROVIDER to "s3" or "webdav" to use an external object store
# or WebDAV server instead of (or in addition to) Google Drive.
# STORAGE_PROVIDER="google-drive"
# S3 / Cloudflare R2 (S3-compatible). R2 requires forcePathStyle=true.
# STORAGE_S3_ENDPOINT="https://<account>.r2.cloudflarestorage.com"
# STORAGE_S3_REGION="auto"
# STORAGE_S3_BUCKET="my-bucket"
# STORAGE_S3_ACCESS_KEY_ID=""
# STORAGE_S3_SECRET_ACCESS_KEY=""
# STORAGE_S3_FORCE_PATH_STYLE="true"
# STORAGE_S3_ROOT_NAME="S3 Storage"
# WebDAV (e.g. Nextcloud, nginx WebDAV)
# STORAGE_WEBDAV_URL="https://dav.example.com"
# STORAGE_WEBDAV_USERNAME=""
# STORAGE_WEBDAV_PASSWORD=""
# STORAGE_WEBDAV_BASEPATH="/"
# STORAGE_WEBDAV_ROOT_NAME="WebDAV"
# --- GOOGLE DRIVE CREDENTIALS ---
# These values will be automatically filled and saved to your .env file
# once you complete the Setup Wizard at /setup in your browser.
# No manual entry is required here.
GOOGLE_CLIENT_ID=""
GOOGLE_CLIENT_SECRET=""
GOOGLE_REFRESH_TOKEN=""
# Your Google Drive root folder ID (the folder to expose as "Home")
NEXT_PUBLIC_ROOT_FOLDER_ID=""
NEXT_PUBLIC_ROOT_FOLDER_NAME="Home"
# Optional: JSON array of additional drives
# NEXT_PUBLIC_MANUAL_DRIVES='[{"id":"drive_id","name":"Drive Name"}]'
# Optional: JSON array of folder IDs to hide from non-admin users
# PRIVATE_FOLDER_IDS='["folder_id_1","folder_id_2"]'
# ------------------------------------------------------------------------------
# 3. LOCAL STORAGE CONFIGURATION
# ------------------------------------------------------------------------------
# Enable or disable local storage
NEXT_PUBLIC_ENABLE_LOCAL_STORAGE=true
# Path to local storage (absolute or relative to project root)
LOCAL_STORAGE_PATH="storage"
NEXT_PUBLIC_LOCAL_STORAGE_NAME="Local Storage"
# ------------------------------------------------------------------------------
# 4. DATABASE (PostgreSQL)
# ------------------------------------------------------------------------------
# For Docker: just fill these three — Docker Compose builds DATABASE_URL automatically
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=zee_index
# For non-Docker or external database, set the full connection string:
# DATABASE_URL="postgresql://user:password@host:5432/zee_index?schema=public"
# ------------------------------------------------------------------------------
# 4. CACHING (Redis) — Optional but recommended
# ------------------------------------------------------------------------------
# Docker Compose sets REDIS_URL automatically (redis://redis:6379)
# For external Redis:
# REDIS_URL="redis://localhost:6379"
# ------------------------------------------------------------------------------
# 5. LIMITS & MONITORING
# ------------------------------------------------------------------------------
STORAGE_LIMIT_GB=15
STORAGE_WARNING_THRESHOLD=0.90
CRON_SECRET="generate-random-string-for-cron-protection"
CRON_MONITOR_INTERVAL_SECONDS=300
# Incident monitoring thresholds
ALERT_AUTH_FAILURE_THRESHOLD=5
ALERT_AUTH_FAILURE_WINDOW_MS=600000
ALERT_DOWNLOAD_SPIKE_THRESHOLD=40
ALERT_DOWNLOAD_SPIKE_WINDOW_MS=300000
# ------------------------------------------------------------------------------
# 6. EXTERNAL SERVICES (Optional)
# ------------------------------------------------------------------------------
# TMDB API key for movie/TV metadata enrichment
# TMDB_API_KEY=""
# Email notifications (for storage alerts, weekly reports)
# SMTP_HOST="smtp.gmail.com"
# SMTP_PORT="465"
# SMTP_USER="your-email@gmail.com"
# SMTP_PASS="your-app-password"
# EMAIL_FROM="NOT CLOUD <no-reply@example.com>"
# Incident chat notifications (Discord and/or Telegram)
# At least one channel is required for chat alerts. Both are optional and
# can be enabled independently. They fire alongside email when an incident
# is created (rate-limited by the same cooldown as email).
# Discord: paste a Incoming Webhook URL from your server's Integrations page.
# NOTIFY_DISCORD_WEBHOOK="https://discord.com/api/webhooks/000000000000000000/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Telegram: create a bot via @BotFather to get the token, then send a message
# to the chat (or use @userinfobot to get the chat id). Comma-separate multiple
# chat ids to notify several groups/users.
# NOTIFY_TELEGRAM_BOT_TOKEN="123456789:AAExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# NOTIFY_TELEGRAM_CHAT_ID="-1001234567890, 987654321"
# ------------------------------------------------------------------------------
# 7. DEPLOYMENT & INFRASTRUCTURE (Optional)
# ------------------------------------------------------------------------------
# DuckDNS dynamic DNS + Caddy auto-HTTPS
# DUCKDNS_DOMAIN="your-subdomain"
# DUCKDNS_TOKEN="your-token"
# CADDY_SITE="your-subdomain.duckdns.org"
# ------------------------------------------------------------------------------
# 8. BUILD SETTINGS
# ------------------------------------------------------------------------------
SKIP_ENV_VALIDATION=false
# ANALYZE=false