Files
forumlify/.env.example
lezi-fun ec50efea89 feat: support serverless deployment (Vercel / Cloudflare Pages)
- Replace bcrypt (native) with bcryptjs (pure JS) — no native build on serverless
- Storage abstraction (lib/storage.js): local uploads/ for traditional deploy, S3-compatible (R2/MinIO/S3 via aws4fetch) for serverless
- DB pool auto-adapts to serverless (single connection, rotation, timeouts)
- next.config.js: standalone output only when DOCKER=1 (serverless skips it)
- Docs: serverless deployment section in README, S3 env vars in .env.example
2026-08-10 09:55:18 +08:00

21 lines
700 B
Bash
Raw Permalink 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.
# Forumlify 环境变量示例
# 复制为 .env 并按需修改
# PostgreSQL 连接串(默认与 docker-compose.yml 一致)
DATABASE_URL=postgresql://forumlify:123456@localhost:5432/forumlify
# JWT 签名密钥(生产环境务必修改为随机长字符串)
JWT_SECRET=forumlify-secret-key-change-me-in-production
# 可选:监听端口/地址(也可在 config.js 中设置 SERVER_PORT / SERVER_HOST)
# PORT=3000
# HOST=0.0.0.0
# ===== Serverless / 对象存储(可选,仅 serverless 部署需要)=====
# S3_ENDPOINT=https://xxx.r2.cloudflarestorage.com
# S3_BUCKET=forumlify
# S3_REGION=auto
# S3_ACCESS_KEY_ID=
# S3_SECRET_ACCESS_KEY=
# S3_PUBLIC_URL=https://cdn.example.com