Files
ZhiwuProject/.env.example
T
2026-11-25 15:57:10 +08:00

28 lines
1.4 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 對外網址:分享連結、og:image、信件裡的連結都用這個
PUBLIC_URL=https://zhiwu-project.sthkm3.org
# 經 cloudflared(https)對外時設 1,登入 cookie 只走 https(本機 http://127.0.0.1 也能用)
COOKIE_SECURE=1
# 本機除錯用的 port(只綁 127.0.0.1)。容器內固定是 2040,cloudflared 指到 http://zhiwuproject:2040
PORT=2041
# cloudflared 容器所在的 Docker 網路名稱(docker network ls);沒有就先 docker network create tunnel
TUNNEL_NETWORK=tunnel
# ---- 寄信(SMTP,容器主動連出去,不經過 tunnel)----
# 帳密留空 = 不寄信,驗證碼印在 log(docker compose logs zhiwuproject)
# Resend:USER=resend,PASSWORD=API key
# 臨時用 Gmail:HOST=smtp.gmail.com,USER=Gmail 帳號,PASSWORD=應用程式密碼(寄件人會變成那個 Gmail)
SMTP_HOST=smtp.resend.com
SMTP_PORT=465
SMTP_USER=resend
SMTP_PASSWORD=
# 寄件人,網域要和寄信服務驗證過的網域相同
MAIL_FROM=[email protected]
# ---- 管理員(UID 00000000)----
# ADMIN_LOGIN 要是信箱格式(不會寄信,用猜不到的前綴、不要用任何使用者的信箱)
# 登入框的信箱欄輸入它,驗證碼用 Aegis 等 TOTP App 算(SHA1、6 位、30 秒)
# ADMIN_TOTP 是 base32 密鑰;兩個都留空 = 停用管理員登入。改完執行 docker compose up -d
# 換手機時:docker compose exec zhiwuproject python -m app.admin totp-uri
ADMIN_LOGIN=
ADMIN_TOTP=