backend/.env.example
Set these on your host before deploying. Each platform has an “Environment Variables” section in the deploy flow.
ENV
Environment: "dev" or "prod" (controls docs endpoint visibility)
DATABASE_URL
secret
Database
JWT_SECRET
secret
JWT 使用 python -c "import secrets; print(secrets.token_hex(64))" 生成
JWT_ALGORITHM
secret
JWT_EXPIRE_DAYS
secret
GITHUB_CLIENT_ID
GitHub OAuth
GITHUB_CLIENT_SECRET
secret
GOOGLE_CLIENT_ID
Google OAuth
GOOGLE_CLIENT_SECRET
secret
MICROSOFT_CLIENT_ID
Microsoft — 在 Azure Portal > https://entra.microsoft.com/ > “应用注册”
MICROSOFT_CLIENT_SECRET
secret
MICROSOFT_REDIRECT_URI
COS_SECRET_ID
secret
Tencent Cloud COS
COS_SECRET_KEY
secret
COS_REGION
COS_BUCKET
FRONTEND_URL
Frontend
brew install flyctl && fly launch --from https://github.com/morvanzhou/whoami
curl -L https://fly.io/install.sh | sh && fly launch --from https://github.com/morvanzhou/whoami
iwr https://fly.io/install.ps1 -useb | iex; fly launch --from https://github.com/morvanzhou/whoami