Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
120 lines (103 loc) · 5.37 KB
/
Copy path.env.example
File metadata and controls
120 lines (103 loc) · 5.37 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Copy to .env for local development. These are SCALAR settings and secrets;
# they override config.yaml and the built-in defaults (precedence: env > file >
# defaults — docs/02 §11). Structured maps (OIDC claim mapping, branding theme)
# live in config.yaml, not here.
# --- Core ---
# Public URL the app is reached at. Used to build the OIDC redirect_uri and to
# decide Secure cookies. This MUST match the EXACT origin your browser uses
# (host included — localhost and 127.0.0.1 are different cookie hosts):
# - embedded binary (make serve): browse http://localhost:8080
# - Vite dev loop (browser hits Vite): the Vite origin, e.g. http://localhost:5180
# Note: this is independent of OIDC_ISSUER_URL below, which must use 127.0.0.1 for
# the server→mock calls regardless of what you browse.
PUBLIC_URL=http://localhost:8080
# Listen address for the Go server.
HTTP_ADDR=:8080
# debug | info | warn | error
LOG_LEVEL=debug
# Directory of mounted branding assets served at /branding/ (logos, favicon).
BRANDING_DIR=branding
# Optional path to the structured config file (OIDC claim mapping, branding).
# Leave unset to use built-in defaults (the UOS skin).
# CONFIG_FILE=config.yaml
# --- Database (matches `make db`) ---
DATABASE_URL=postgres://wolke:devpass@localhost:5432/wolke?sslmode=disable
# --- Secrets ---
# Signs the session cookie. Generate one: openssl rand -base64 32
SESSION_SECRET=dev-only-change-me
# Optional bearer token for /metrics. Leave UNSET in the normal deploy: Caddy
# 404s /metrics at the edge and the app port is internal-only, so Prometheus
# scrapes it over the trusted network without a secret. Set it (generate as
# above) only if the scrape path crosses an untrusted boundary. See README →
# "Metrics & monitoring".
# METRICS_TOKEN=
# Comma-separated proxy CIDRs allowed to set X-Forwarded-*. Empty in local dev
# (no proxy); set to Caddy's network in Compose/prod.
# TRUSTED_PROXIES=10.0.0.0/8
# --- OIDC (scalars here; claim mapping in config.yaml) ---
# Points at the local mock IdP from `make idp`. Without these the server runs in
# stub mode and the authenticated endpoints (/api/me, /api/catalog, …) are absent,
# so the SPA can't load. Use 127.0.0.1 (not localhost): the mock crashes on IPv6.
OIDC_ISSUER_URL=http://127.0.0.1:8455/default
OIDC_CLIENT_ID=wolke
OIDC_CLIENT_SECRET=dev-secret
OIDC_SCOPES=openid,profile,email
# --- Compose stack only (compose.yaml) ---
# These are read by Compose (it auto-loads this .env from the project root); they
# are not used by the `make run` loop. Both fail closed — `compose up` aborts if
# unset — so a deploy never silently runs with a default secret.
# Postgres superuser password for the stack's database.
POSTGRES_PASSWORD=change-me-in-compose
# Caddy ports. Rootless podman can't bind <1024 — override to high ports then.
# CADDY_HTTP_PORT=8080
# CADDY_HTTPS_PORT=8443
# --- Production stack only (compose.prod.yaml) ---
# Which published app image to pull and at what version. Both fail closed.
# IMAGE_REPO=ghcr.io/<owner>/<repo>
# WOLKE_VERSION=1.4.0
# In production also set PUBLIC_URL and the OIDC_* values above to real values
# (compose.prod.yaml requires PUBLIC_URL, OIDC_ISSUER_URL/CLIENT_ID/CLIENT_SECRET).
# The app applies migrations on startup by default. Set to false to manage them
# out of band (e.g. the goose CLI / `make migrate`).
# AUTO_MIGRATE=false
# --- Backups (compose.prod.yaml, `--profile backup`) -----------------------
# OPT-IN. Leave this whole block commented out and the stack runs exactly as it
# does today — the `backup` service only exists under `--profile backup`. When
# you DO enable it, the service fails closed and loudly: unset variables, an
# unreachable bucket, wrong credentials or an unreachable database all log at
# ERROR and exit non-zero, so the container crash-loops visibly. See
# README → "Backups" and docs/runbooks/restore-postgres.md.
#
# Where the encrypted backups go. Any restic backend works; S3 is the tested
# one. The path segment after the host is the bucket (created on first run).
# RESTIC_REPOSITORY=s3:https://s3.example.org/wolke-backups
# Encrypts the repository. Generate one: openssl rand -base64 32
# *** Store this outside the server. Losing it loses every backup. ***
# RESTIC_PASSWORD=
# S3 credentials. Required for s3: repositories; ignored for other backends.
# AWS_ACCESS_KEY_ID=
# AWS_SECRET_ACCESS_KEY=
# AWS_DEFAULT_REGION=us-east-1
# Schedule: seconds between backups (default 86400 = daily). This is a plain
# sleep loop, not cron — the first backup runs at container start unless
# BACKUP_RUN_ON_START=false.
# BACKUP_INTERVAL_SECONDS=86400
# BACKUP_RUN_ON_START=true
# Retention, applied by `restic forget --prune` after every backup. Defaults
# keep roughly six months: a week of dailies, a month of weeklies, six months
# of monthlies.
# BACKUP_KEEP_DAILY=7
# BACKUP_KEEP_WEEKLY=4
# BACKUP_KEEP_MONTHLY=6
# Snapshot tag; also what `restic forget` scopes its policy to. Give each
# deployment sharing one bucket its own tag.
# BACKUP_TAG=wolke-db
# Create the repository on first run. Set false to require `restic init` by
# hand, so a typo'd RESTIC_REPOSITORY fails loudly instead of starting a
# second, empty repository.
# BACKUP_INIT_REPO=true
# Seconds to wait for the repository before calling it unreachable.
# BACKUP_PROBE_TIMEOUT=45
# Pin restic itself (Alpine package version), e.g. 0.18.1-r7. Unset tracks the
# base image's Alpine release.
# BACKUP_RESTIC_VERSION=