Files
edgeever/.env.local.example
T

75 lines
2.7 KiB
Bash

# Copy to .env.local and never commit that file.
# Cloudflare
# Find the account ID with `bunx wrangler whoami`.
CLOUDFLARE_ACCOUNT_ID=
# User API Token for `bun run deploy:builds:setup`; do not use an Account API Token.
# Required permissions:
# - Workers Builds Configuration: Edit
# - Workers Scripts: Read
EDGE_EVER_BUILDS_API_TOKEN=
EDGE_EVER_WORKER_NAME=edgeever
EDGE_EVER_WORKERS_DEV=true
# Optional for local CLI deployments. CI deployments discover the URL from Wrangler output.
EDGE_EVER_DEPLOYMENT_URL=
# Storage
EDGE_EVER_D1_DATABASE_NAME=edgeever
# Use the database_id returned by Cloudflare.
EDGE_EVER_D1_DATABASE_ID=00000000-0000-0000-0000-000000000000
EDGE_EVER_R2_BUCKET_NAME=edgeever-resources
# Optional bucket for isolated preview/dev attachments.
EDGE_EVER_R2_PREVIEW_BUCKET_NAME=edgeever-resources-preview
# Authentication
# Initial login credentials; the password is uploaded as a Worker Secret.
EDGE_EVER_AUTH_USERNAME=admin
EDGE_EVER_AUTH_PASSWORD=
# Allowed range: 1-400 days.
EDGE_EVER_SESSION_TTL_DAYS=400
# Portable application-level login protection. These values work in both D1 and SQLite.
# The defaults are 5 attempts per username / 15 minutes and 30 attempts per IP / 5 minutes.
EDGE_EVER_AUTH_LOGIN_WINDOW_SECONDS=900
EDGE_EVER_AUTH_LOGIN_USERNAME_MAX_ATTEMPTS=5
EDGE_EVER_AUTH_LOGIN_USERNAME_COOLDOWN_SECONDS=900
EDGE_EVER_AUTH_LOGIN_IP_MAX_ATTEMPTS=30
EDGE_EVER_AUTH_LOGIN_IP_COOLDOWN_SECONDS=300
# Demo mode
# Seeds sample content and periodically resets it; intended for public demos only.
EDGE_EVER_DEMO_MODE=false
# UTC Cron schedule, used only when demo mode is enabled.
# Default: 0 19 * * * = every day at 03:00 China Standard Time (UTC+8).
EDGE_EVER_DEMO_RESET_CRON=0 19 * * *
# Routing
# Example: notes.example.com
EDGE_EVER_CUSTOM_DOMAIN=
# Optional full route pattern; otherwise the custom domain is used.
EDGE_EVER_ROUTE_PATTERN=
# Local frontend
VITE_API_BASE_URL=http://127.0.0.1:8787
# Self-hosted Bun runtime (used by `bun run start:self-hosted`).
# The data directory should be mounted as the persistent Docker/NAS volume.
EDGE_EVER_DATA_DIR=.edgeever-data
EDGE_EVER_SQLITE_FILE=.edgeever-data/edgeever.sqlite
EDGE_EVER_RESOURCES_DIR=.edgeever-data/resources
EDGE_EVER_PORT=8787
# Set to `s3` for AWS S3, MinIO, R2, OSS, or COS through the S3-compatible API.
EDGE_EVER_STORAGE_BACKEND=local
EDGE_EVER_S3_ENDPOINT=
EDGE_EVER_S3_REGION=us-east-1
EDGE_EVER_S3_BUCKET=
EDGE_EVER_S3_ACCESS_KEY_ID=
EDGE_EVER_S3_SECRET_ACCESS_KEY=
EDGE_EVER_S3_FORCE_PATH_STYLE=false
# Multi-instance deployments
# Select remote instances per command, for example:
# EDGE_EVER_INSTANCE=prod bun run dev:remote
# Instance-specific `EDGE_EVER_<NAME>_*` values override the generic values above.