Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
129 lines (118 loc) · 6.3 KB
/
Copy path.env.example
File metadata and controls
129 lines (118 loc) · 6.3 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
121
122
123
124
125
126
127
128
129
# Application preferences are database-owned; this file is deployment bootstrap.
# See docs/development/configuration-ownership.md before upgrading an existing installation.
# UltimaScraper runtime configuration
# Copy this file to .env and replace every replace-with-... value. USR refuses
# to start while one is left. Native installs can instead run
# uv run python -m ultima_scraper_backend.bootstrap --compose --env-file .env
# which fills in each empty or replace-with-... secret and leaves your values alone.
# Docker: the components this host runs. Every one is optional; drop postgres or
# redis to use existing servers (set ULTIMA_ARCHIVE_DATABASE_URL / REDIS_HOST),
# or run only a worker, or only the WebUI.
COMPOSE_PROFILES=webui,backend,worker,postgres,redis
# API authentication. Docker generates one on first start when this is empty and
# keeps it in the config volume. Opening the WebUI from the server's network
# then goes straight to the setup wizard (elsewhere: the link in the backend log).
USR_ADMIN_TOKEN=
# For Docker secrets, leave the value above empty and set:
# USR_ADMIN_TOKEN_FILE=/run/secrets/usr_admin_token
# Required by the default encrypted-secret storage. Docker generates it on first
# start when empty, like USR_ADMIN_TOKEN. Keep it stable for the lifetime of the
# database (back it up); changing it requires the documented key rotation.
USR_ENCRYPT_SECRETS=true
USR_SECRET_KEY=
# USR_SECRET_KEY_FILE=/run/secrets/usr_secret_key
# USR_SECRET_KEY_PREVIOUS=
# PostgreSQL is the supported runtime database. Leave this empty to use the
# bundled postgres service (POSTGRES_* below); set it for an existing server, e.g.
# postgresql+psycopg://ultimascraper:PASSWORD@db.example.test:5432/ultima_archive
ULTIMA_ARCHIVE_DATABASE_URL=
# ULTIMA_ARCHIVE_DATABASE_URL_FILE=/run/secrets/usr_database_url
# DATABASE_URL is a deprecated alias of ULTIMA_ARCHIVE_DATABASE_URL.
USR_EXPECTED_DATABASE=ultima_archive
# Set this when ULTIMA_ARCHIVE_DATABASE_URL points at PgBouncer on a non-standard host/port.
ULTIMA_USE_PGBOUNCER=false
# Effective runtime user/database mode, verified independently of global pool_mode.
# Keep unknown/session on NullPool; transaction opts management clients into reuse.
ULTIMA_PGBOUNCER_GLOBAL_POOL_MODE=unknown
# Per process; zero overflow. Inventory all processes before increasing this cap.
ULTIMA_PGBOUNCER_GLOBAL_POOL_SIZE=2
# Redis queue, coordination, and live-event connection. "redis" is the bundled
# Docker service; use 127.0.0.1 or your server's address otherwise.
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD=replace-with-a-strong-redis-password
# REDIS_PASSWORD_FILE=/run/secrets/usr_redis_password
# Redis data-memory budget; this is not a whole-process or whole-host limit.
# Choose it with the other services' measured budgets. The existing 4gb fallback
# is not a recommendation for PostgreSQL/Redis/USR sharing a 4 GB SBC.
# noeviction makes capacity exhaustion explicit and preserves queued work.
REDIS_MAXMEMORY=4gb
# One shared lazy pool per process. These are ceilings, not pre-opened
# connections, and they do not scale the PostgreSQL writer pool.
ULTIMA_REDIS_APPLICATION_MAX_CONNECTIONS=256
ULTIMA_REDIS_WORKER_MAX_CONNECTIONS=32
ULTIMA_REDIS_WRITER_MAX_CONNECTIONS=8
ULTIMA_REDIS_POOL_WAIT_TIMEOUT_SECONDS=30
# Runtime settings.
USR_WEB_PORT=21120
# HTTPS for the WebUI: "self-signed" creates a certificate in its data volume,
# or name your own certificate and key (mounted into the webui container).
# See docs/operations/webui-server.md#https.
# USR_WEBUI_TLS=self-signed
# USR_WEBUI_TLS_HOSTNAMES=nas.example.test
# USR_WEBUI_TLS_CERT_FILE=/tls/cert.pem
# USR_WEBUI_TLS_KEY_FILE=/tls/key.pem
# Public names the WebUI answers to, e.g. behind a reverse proxy, and the
# proxies trusted to report the browser's address.
# See docs/operations/webui-server.md#host-names-and-reverse-proxies.
# USR_WEBUI_ALLOWED_HOSTS=usr.example.com
# USR_WEBUI_TRUSTED_PROXIES=127.0.0.1
# Stable id that keys this deployment's stored settings (Docker default: usr-docker;
# native default: the machine hostname). Changing it later starts a fresh setup.
# BACKEND_ID=usr-docker
# Where other machines reach this backend's API. Backends sharing a database form
# a cluster; a WebUI connected to one member offers the others at this address.
# USR_PUBLIC_API_URL=http://nas.example.test:21121
# USR_PLUGINS_DIR=/app/__user_data__/plugins
# Optional Compose storage overlays require existing external host directories.
# Each location is independent; no particular drive, mount name or capacity is assumed.
# USR_CONFIG_DIRECTORY=
# USR_USER_DATA_DIRECTORY=
# USR_LOG_DIRECTORY=
# Persistent service diagnostics (default: repository/logs/runtime).
# LOG_ROOT=/path/to/logs
# USR_LOG_DIR=/path/to/runtime-logs
# LOG_RETENTION_DAYS=7
# USR_TEMP_DIRECTORY=
# USR_MEDIA_DIRECTORY=
# USR_STAGING_DIRECTORY=
# USR_POSTGRES_DIRECTORY=
# USR_REDIS_DIRECTORY=
# Optional remote-access restrictions.
# USR_ALLOWED_HOSTS=localhost,usr.example.test
# USR_ALLOWED_ORIGINS=https://usr.example.test
# USR_WS_ALLOWED_ORIGINS=https://usr.example.test
# Bundled PostgreSQL (the postgres profile), also used to reach it while
# ULTIMA_ARCHIVE_DATABASE_URL is empty. The password is passed separately, so
# it does not need URL encoding.
POSTGRES_USER=ultimascraper
POSTGRES_PASSWORD=replace-with-a-strong-database-password
POSTGRES_DB=ultima_archive
# Optional image/tag overrides. Images come from ghcr.io; pin a release such as
# 0.1.0 instead of latest to upgrade only when you choose. The image built
# locally with docker-compose.build.yml is named ultimascraper:dev.
# USR_VERSION=latest
# USR_REQUIRE_WHEELHOUSE=0
# The full image runs the backend, worker and WebUI containers:
# USR_IMAGE=ghcr.io/ultimahoarder/ultimascraper/ultimascraper
# Or run a service from its own image instead (the WebUI's is much smaller):
# USR_BACKEND_IMAGE=ghcr.io/ultimahoarder/ultimascraper/backend
# USR_WORKER_IMAGE=ghcr.io/ultimahoarder/ultimascraper/worker
# USR_WEBUI_IMAGE=ghcr.io/ultimahoarder/ultimascraper/webui
# Optional tuning: database writer, job windows, batch/byte budgets, Redis
# connection pools and cache ceilings. Code defaults are used when unset; see
# docs/operations/environment-reference.md before setting any of them.
#
# Worker task concurrency, claim batch size, finished-job cleanup and
# completed-job retention are application settings (Settings > Network).