Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
116 lines (94 loc) · 4.93 KB
/
Copy path.env.example
File metadata and controls
116 lines (94 loc) · 4.93 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
# Postgres runs outside the linq image. Required for local development and the
# external-Postgres Compose examples; bundled Compose stacks override it with
# their internal Postgres service.
DATABASE_URL=postgres://linq:linq@localhost:5432/linq
# PostgreSQL schema linq owns. Leave unset to use public; set this when linq
# must coexist with other applications in the same database.
# LINQ_DB_SCHEMA=public
# Used by the bundled-Postgres Docker Compose examples. Replace the password
# before deploying; if it contains URL-reserved characters, percent-encode the
# same characters in the DATABASE_URL that Compose constructs for linq.
POSTGRES_USER=linq
POSTGRES_PASSWORD=linq
POSTGRES_DB=linq
# Where the redirect cache lives: memory | redis | none. Left unset it follows
# LINQ_REDIS_URL below — a URL selects redis, nothing at all selects memory.
# See docs/adr/0009 for what the two differ in.
#
# memory an LRU inside the linq process. Nothing else to run.
# redis a shared store. Reachable by every linq process that points at it.
# none no caching; every redirect reads Postgres.
#
# LINQ_CACHE_BACKEND=memory
# Set this and Redis becomes the cache — and has to be running, or the server
# exits on boot. A Redis that goes down *later* degrades to Postgres rather than
# failing requests.
# LINQ_REDIS_URL=redis://localhost:6379
# Seconds a cached lookup survives, on whichever backend — five minutes by
# default. Only a backstop for an invalidation that was missed: every create,
# update, archive and purge clears its own entry outright.
#
LINQ_CACHE_TTL=300
# Seconds between sweeps that physically remove expired entries from the
# `memory` backend, from 1 to 3600. Expiry is still exact on read; Redis ignores
# this setting.
# LINQ_CACHE_SWEEP_INTERVAL=60
# How many entries the `memory` backend holds before evicting the least recently
# used. Entries, not bytes — the memory this implies depends on what is cached.
# Redis ignores it: a keyspace is capped with `maxmemory` in redis.conf instead.
# LINQ_CACHE_MAX_ENTRIES=10000
# HTTP port for redirects and the REST API, and for the Client UI when this server
# serves the built export. The UI can also be deployed on its own; see the README.
LINQ_PORT=3000
# Client UI mount for local builds and the server process. The Docker Compose
# examples pass this value to docker/dockerfiles/Dockerfile as a build
# argument; rebuild the
# image when changing it.
# Must start with /, use lowercase path segments, and have no trailing slash.
# / (the root) is allowed only together with LINQ_APP_HOST below.
LINQ_CLIENT_BASE_PATH=/home
# The one host that serves the Client UI, e.g. linq.example.com. Set, the UI
# answers only there and shortening domains never serve it, which is what lets
# LINQ_CLIENT_BASE_PATH be /. The API still answers on every host. Must differ
# from LINQ_DEFAULT_DOMAIN and from every domain row. See docs/adr/0019.
# LINQ_APP_HOST=linq.example.com
# Port for the Client UI development server (`bun run dev:client`) and the
# published host port in docker/examples/docker-compose/10-client-only.yml.
# The combined Docker image serves its UI on LINQ_PORT instead.
LINQ_CLIENT_PORT=3001
# Seeds the first domain row when the domains table is empty. This is a
# shortening domain (short links read https://<this host>/<slug>), never the
# app host.
LINQ_DEFAULT_DOMAIN=localhost:${LINQ_PORT}
# Where the log file is stored.
LINQ_DATA_DIR=./data
# Length of generated random slugs.
LINQ_SLUG_LENGTH=6
# trace|debug|info|warn|error|fatal|silent. debug adds request params, query
# *keys* and span input/output. Client IPs are never logged; see docs/adr/0003.
LINQ_LOG_LEVEL=info
# NDJSON log file. Defaults to $LINQ_DATA_DIR/logs/linq.log; set empty for stdout only.
# LINQ_LOG_FILE=
# Rotation. Disk used is at most LINQ_LOG_MAX_SIZE x (LINQ_LOG_RETAIN + 1), which
# is the whole of what the data volume holds.
LINQ_LOG_MAX_SIZE=20m
LINQ_LOG_RETAIN=5
# Disabled by default: this feature makes outbound requests to a link's
# destination. Enable it only where network egress blocks internal/private
# services (see docs/adr/0014-link-previews-fetch-the-destination-directly.md).
# LINQ_FETCH_LINK_METADATA=true
# Per-process safety limits. Keep an edge rate limit in front of a public
# deployment; linq intentionally does not trust X-Forwarded-For itself.
# LINQ_API_RATE_LIMIT_PER_MINUTE=1000
# LINQ_VISIT_MAX_PENDING=1000
# Only used by the integration test suite.
# TEST_DATABASE_URL=postgres://linq:linq@localhost:5432/linq_test
# Caddy's admin API. Setting this is what turns on domain sync: every domain
# create, patch, archive and purge is pushed to Caddy as its own route, so
# linq never has to be told a domain twice. Left unset, nothing is synced
# anywhere and linq behaves exactly as it does today. See
# docker/examples/docker-compose/.
# LINQ_CADDY_ADMIN_URL=http://caddy:2019
# Where Caddy reverse-proxies a matched domain to. Required once
# LINQ_CADDY_ADMIN_URL is set.
# LINQ_CADDY_UPSTREAM=linq:3000