104 lines
4.7 KiB
Bash
104 lines
4.7 KiB
Bash
# EdgeEver local environment variables.
|
|
# Copy this file to .env.local, fill in your own values, and never commit that file.
|
|
|
|
# Cloudflare account ID.
|
|
# Find it with `bunx wrangler whoami`.
|
|
CLOUDFLARE_ACCOUNT_ID=
|
|
|
|
# Cloudflare API token.
|
|
# Leave empty when authenticated locally with `wrangler login`; set it for CI/CD deployments.
|
|
CLOUDFLARE_API_TOKEN=
|
|
|
|
# Optional USER API Token for configuring Cloudflare Workers Builds.
|
|
# Do NOT use an Account API Token: the Workers Builds Configuration API accepts
|
|
# user-scoped tokens only. Create it at https://dash.cloudflare.com/profile/api-tokens
|
|
# (My Profile -> API Tokens, not Manage Account -> Account API Tokens):
|
|
# Do not choose a prebuilt template (including Edit Cloudflare Workers). Instead:
|
|
# Create Token -> Create Custom Token -> add Account permissions:
|
|
# - Workers Builds Configuration: Edit
|
|
# - Workers Scripts: Read
|
|
# Verify that exact two-permission summary before creating it. Cloudflare shows the
|
|
# value once: save it here privately, never commit, screenshot, or share it.
|
|
# Limit it to the Cloudflare account that hosts this instance and set an expiry.
|
|
# It is used only by `bun run deploy:builds:setup` and is never sent to the Worker.
|
|
EDGE_EVER_BUILDS_API_TOKEN=
|
|
|
|
# Optional Workers Builds build-token UUID. Set this only when the Cloudflare
|
|
# account has multiple build tokens and setup cannot choose one automatically.
|
|
# The selected build token must be able to apply D1 migrations and deploy Workers.
|
|
EDGE_EVER_BUILDS_BUILD_TOKEN_UUID=
|
|
|
|
# Optional: set this only for a Git-integrated Cloudflare Pages project.
|
|
# `bun run deploy:builds:setup` then limits its Git builds to apps/site/* plus
|
|
# shared root dependency files. The User API Token also needs Account ->
|
|
# Cloudflare Pages -> Edit. Direct Upload projects use their deploy workflow's
|
|
# path filters instead, so leave this empty for those projects.
|
|
EDGE_EVER_PAGES_PROJECT_NAME=
|
|
|
|
# Worker service name.
|
|
# Defaults to the `edgeever` Cloudflare Worker.
|
|
EDGE_EVER_WORKER_NAME=edgeever
|
|
|
|
# Whether to enable the workers.dev subdomain. Allowed values: true / false.
|
|
EDGE_EVER_WORKERS_DEV=true
|
|
|
|
# D1 database name.
|
|
# Create it with: `bunx wrangler d1 create edgeever`
|
|
EDGE_EVER_D1_DATABASE_NAME=edgeever
|
|
|
|
# D1 database ID.
|
|
# After creating the D1 database, copy the returned database_id here.
|
|
# Cloudflare Workers Builds also requires this variable in Build Variables.
|
|
# The scripts generate a temporary .wrangler.generated.toml, so you do not need to
|
|
# commit your personal D1 ID to the public repository.
|
|
EDGE_EVER_D1_DATABASE_ID=00000000-0000-0000-0000-000000000000
|
|
|
|
# Production R2 bucket name.
|
|
# Create it with: `bunx wrangler r2 bucket create edgeever-resources`
|
|
EDGE_EVER_R2_BUCKET_NAME=edgeever-resources
|
|
|
|
# Preview/local development R2 bucket name.
|
|
# Optional; use it to isolate test attachments in Wrangler preview/dev environments.
|
|
EDGE_EVER_R2_PREVIEW_BUCKET_NAME=edgeever-resources-preview
|
|
|
|
# Login username.
|
|
EDGE_EVER_AUTH_USERNAME=admin
|
|
|
|
# PBKDF2-SHA256 hash of the login password.
|
|
# Generate it with: `bun run auth:hash -- <your-password>`
|
|
# For multi-instance deployments, use `EDGE_EVER_<INSTANCE>_AUTH_PASSWORD_HASH`
|
|
# to configure a different password for each instance.
|
|
# For Workers Builds, store this as a Cloudflare Build Secret. The deploy command
|
|
# synchronizes it to the runtime Worker Secret after every successful deployment.
|
|
EDGE_EVER_AUTH_PASSWORD_HASH=
|
|
|
|
# Web session lifetime in days. The server limits it to 1-400 days.
|
|
EDGE_EVER_SESSION_TTL_DAYS=400
|
|
|
|
# Optional: public demo mode. Recommended only for shared demo environments such as demo.edgeever.org.
|
|
# When enabled, the Worker fills missing sample content and periodically resets demo data with Cron.
|
|
EDGE_EVER_DEMO_MODE=false
|
|
|
|
# Optional: demo reset Cron schedule, in UTC. Defaults to `0 19 * * *` (03:00 Beijing time).
|
|
# The deployment scripts add it to the temporary Wrangler config only when EDGE_EVER_DEMO_MODE=true.
|
|
EDGE_EVER_DEMO_RESET_CRON=0 19 * * *
|
|
|
|
# Optional: custom domain. The deployment scripts create a custom_domain route when set.
|
|
# Example: notes.example.com
|
|
EDGE_EVER_CUSTOM_DOMAIN=
|
|
|
|
# Optional: full route pattern. Falls back to EDGE_EVER_CUSTOM_DOMAIN when unset.
|
|
# Example: notes.example.com/*
|
|
EDGE_EVER_ROUTE_PATTERN=
|
|
|
|
# Frontend API base URL.
|
|
# Local development defaults to the Wrangler dev server: `bun run dev:api`
|
|
VITE_API_BASE_URL=http://127.0.0.1:8787
|
|
|
|
# Optional: multi-instance deployment.
|
|
# Set `EDGE_EVER_INSTANCE=<name>` in .env.local or Cloudflare Build Variables.
|
|
# The scripts prefer `EDGE_EVER_<NAME>_*` values and fall back to the generic
|
|
# `EDGE_EVER_*` values above.
|
|
# For example, `EDGE_EVER_INSTANCE=prod` prefers `EDGE_EVER_PROD_WORKER_NAME`,
|
|
# `EDGE_EVER_PROD_D1_DATABASE_ID`, `EDGE_EVER_PROD_R2_BUCKET_NAME`, and similar variables.
|