-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.web.example
More file actions
90 lines (75 loc) · 3.83 KB
/
Copy path.env.web.example
File metadata and controls
90 lines (75 loc) · 3.83 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
90
# VarLens — web mode environment
#
# Only used when running the Fastify web build (`out/web/server.cjs` or the
# container image). Desktop builds ignore this file entirely.
#
# Local web development reads `.env.postgres.local` plus optional
# `.env.web.local` via:
#
# make web-dev
# VARLENS_WEB=1 make dev
#
# That target builds the browser bundle with `VARLENS_WEB_BASE=/` and runs
# the server with `APP_PATH_PREFIX=/`, so local requests go straight to
# Fastify without a production reverse-proxy path prefix.
#
# Copy this file to `.env.web.local` only if you want local web-dev
# overrides such as auth bootstrap. Override local port/schema with
# `WEB_DEV_PORT=8790 WEB_DEV_SCHEMA=my_schema make web-dev`.
# In production the deployment operator sets these via the deploy repo.
# --- Server ---------------------------------------------------------------
# Bind port. Local default is 8787 via `make web-dev`; the container default
# is 8080 and should be remapped externally by the runtime platform.
VARLENS_WEB_PORT=8787
# Local direct runs should bind localhost. Containers should leave this unset
# or set it to 0.0.0.0 so the runtime platform can reach the app.
VARLENS_WEB_HOST=127.0.0.1
# Optional development-only delay for `/api/*` calls. Ignored unless
# NODE_ENV=development. `make web-dev` defaults to 75ms to expose UI
# loading/race assumptions that localhost otherwise hides.
VARLENS_WEB_API_LATENCY_MS=75
# Pino log level: trace | debug | info | warn | error | fatal
VARLENS_LOG_LEVEL=info
# --- Storage --------------------------------------------------------------
# REQUIRED. Web mode is Postgres-only. For local development, `make web-dev`
# reads this from `.env.postgres.local`; override only for a hosted database.
VARLENS_PG_URL=postgres://varlens:varlens_dev_password@127.0.0.1:55432/varlens_dev
# `make web-dev` ignores the schema from `.env.postgres.local` and sets a
# checkout-specific schema by default. Set `WEB_DEV_SCHEMA=my_schema` on the
# make command only when you intentionally want to reuse a schema.
# VARLENS_PG_SCHEMA=web_dev_varlens
# Required for persisted cookie/session signing when you run the server
# outside tests. Must be absolute. `make web-dev` sets this automatically.
VARLENS_RECOVERY_KEY_DIR=/tmp/varlens-web-dev
# Browser uploads are staged here before import. Defaults to
# `${VARLENS_RECOVERY_KEY_DIR}/uploads`, which maps to `/data/uploads` in
# the container chart. Must be absolute if set.
# VARLENS_WEB_UPLOAD_DIR=/tmp/varlens-web-dev/uploads
# Maximum accepted upload size in bytes. Default: 1073741824 (1 GiB).
# VARLENS_WEB_MAX_UPLOAD_BYTES=1073741824
# How long staged uploads remain resolvable if an import is not started.
# Default: 86400000 (24 hours).
# VARLENS_WEB_UPLOAD_TTL_MS=86400000
# Runtime URL prefix. This MUST match the build-time VARLENS_WEB_BASE used
# for the browser bundle, except that APP_PATH_PREFIX has no trailing slash
# and VARLENS_WEB_BASE does. Example: APP_PATH_PREFIX=/varlens pairs with
# VARLENS_WEB_BASE=/varlens/. `/` means root mount for direct Fastify runs.
APP_PATH_PREFIX=/
# --- Admin bootstrap (optional, one-shot) --------------------------------
#
# If username plus VARLENS_ADMIN_PASSWORD_HASH are set on FIRST boot, the
# server creates a Postgres-backed admin account. Generate the hash with
# `npm run varlens:hash-password` so plaintext never sits in env or shell
# history. Plaintext bootstrap is refused.
#
# After the first successful boot, remove these values from your
# environment so bootstrap material does not linger in /proc/<pid>/environ
# or `docker inspect` output.
#
# If left empty, no admin is created — the operator handles bootstrap
# manually via the UI on first visit.
# `make web-dev` does not supply a password. Set VARLENS_ADMIN_PASSWORD_HASH
# explicitly for a local first run.
VARLENS_ADMIN_USERNAME=
VARLENS_ADMIN_PASSWORD_HASH=
VARLENS_ADMIN_DISPLAY_NAME=