-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
89 lines (80 loc) · 4.42 KB
/
Copy path.env.example
File metadata and controls
89 lines (80 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Client-side settings for talking to the uploads API from scripts, skills,
# and tests. Copy to .env (gitignored) and fill in.
#
# Anonymous CLI usage telemetry (command names only) is on by default.
# Opt out: UPLOADS_TELEMETRY_DISABLED=1 (or DO_NOT_TRACK=1)
#
# For personal CLI defaults, prefer the shared buildinternet config instead:
# ~/.config/buildinternet/config (see packages/uploads/config.example)
# uploads login
#
# The worker itself does not read this file — its local config is
# apps/api/.dev.vars (see apps/api/.dev.vars.example) and its per-workspace
# secrets live in the REGISTRY KV namespace.
# Where the API lives. Local dev (wrangler dev): http://localhost:8787
UPLOADS_API_URL=https://api.uploads.sh
# Your workspace name — the tenant segment in /v1/<workspace>/files/...
# `default` → uploads-default bucket, public at https://storage.uploads.sh.
# Point this at another registered workspace only when you mean to land in
# that workspace's bucket.
UPLOADS_WORKSPACE=default
# CLI (local dev from this repo — no npm publish needed):
# pnpm uploads put ./shot.png --env-file .env
# After publish: npx @buildinternet/uploads put ./shot.png --env-file .env
#
# UPLOADS_WORKSPACE overrides token inference when set. Omit it to use the workspace
# encoded in the token (up_<workspace>_…). CLI: --workspace / -w overrides both.
# Local vs prod: tokens minted with --local only work against localhost; prod tokens
# need UPLOADS_API_URL=https://api.uploads.sh (the default in this file).
# Bearer token for that workspace. For routine agent setup, ask an administrator for
# a short-lived enrollment code and run `uploads login`; the CLI saves this value.
# Never give ADMIN_TOKEN to a routine agent. Direct token minting is reserved for CI,
# migration, and break-glass administration.
# Local dev (--local) tokens are a separate store from production — they only
# work against localhost.
UPLOADS_TOKEN=
# Optional one-command, non-interactive login. Enrollment codes expire quickly and
# should be supplied only for the `uploads login` process, not kept in a persistent
# .env file. Prefer: UPLOADS_ENROLLMENT_CODE=upe_<workspace>_… uploads login
# UPLOADS_ENROLLMENT_CODE=
# ---------------------------------------------------------------------------
# Optional: real Cloudflare/R2 credentials for development.
#
# Plain local dev needs NONE of these — `wrangler dev` simulates R2 and KV
# entirely on disk. Set these only when you want a dev workspace to hit a
# real bucket (HTTP mode / presigning). add-workspace.mjs picks them up
# automatically when the matching flags are omitted:
# cd apps/api && node --env-file=../../.env scripts/add-workspace.mjs \
# <workspace> --bucket <real-bucket> --local
#
# Use a bucket-scoped "Object Read & Write" token (R2 → Manage API Tokens),
# not an account-wide admin token.
R2_ACCOUNT_ID=
R2_ACCESS_KEY_ID=
R2_SECRET_ACCESS_KEY=
# Public custom domain of that bucket, if any (becomes the workspace's publicBaseUrl)
R2_PUBLIC_BASE_URL=
# Optional: dual-host embed CDN for GitHub Camo (same object path as publicBaseUrl).
# Client/CLI: UPLOADS_EMBED_PUBLIC_BASE_URL — unset uses https://embed.uploads.sh when
# the stable host is storage.uploads.sh / store.uploads.sh; empty string disables.
# Worker (apps/api): EMBED_PUBLIC_BASE_URL with the same semantics (see docs/ops.md).
# UPLOADS_EMBED_PUBLIC_BASE_URL=
# EMBED_PUBLIC_BASE_URL=
# ---------------------------------------------------------------------------
# Deploying the stack to your own Cloudflare account.
#
# Wrangler reads these two natively; `pnpm deploy` loads this file first, so
# no `wrangler login` is required. Create the token from the "Edit Cloudflare
# Workers" template and add Workers KV Storage:Edit + Workers R2 Storage:Edit
# + D1:Edit (needed for `d1 migrations apply` in deploy and the D1 Migrations
# GitHub Action). Interactive alternative: skip these and `wrangler login` once.
# Mirror the same two names as repo secrets for CI.
CLOUDFLARE_ACCOUNT_ID=
CLOUDFLARE_API_TOKEN=
# Env vars can't reach into wrangler.jsonc — forks also edit these three
# values in apps/api/wrangler.jsonc:
# routes[0].pattern your API domain (or delete the routes block to serve
# from the workers.dev subdomain)
# kv_namespaces[0].id output of `wrangler kv namespace create REGISTRY`
# d1_databases[0] application DB from `wrangler d1 create uploads-production`
# r2_buckets[0] your bucket name/binding