Repository navigation
Expand file tree
/
Copy pathsample.env
More file actions
96 lines (93 loc) · 4.04 KB
/
Copy pathsample.env
File metadata and controls
96 lines (93 loc) · 4.04 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
# MySQL configuration
MYSQL_ROOT_PASSWORD=geheim_root_123
MYSQL_DATABASE=meine_datenbank
MYSQL_USER=mein_benutzer
MYSQL_PASSWORD=geheim_user_123
MYSQL_HOST=127.0.0.1
# Hosting port
MYSQL_PORT=3306
# Media uploads (POST /media, avatars, community icons and banners)
# local: files in MEDIA_LOCAL_DIR on this host (development).
# s3: an S3-compatible bucket (production): AWS S3, MinIO, Ceph, R2, ...
MEDIA_STORAGE=local
MEDIA_LOCAL_DIR=storage/media
# MEDIA_S3_ENDPOINT=http://127.0.0.1:9000
# MEDIA_S3_REGION=eu-central-1
# MEDIA_S3_BUCKET=community-media
# MEDIA_S3_ACCESS_KEY_ID=
# MEDIA_S3_SECRET_ACCESS_KEY=
# Path-style (endpoint/bucket/key) unless set to false (bucket.endpoint/key).
# MEDIA_S3_FORCE_PATH_STYLE=true
# Serve files from here (a CDN or public bucket) instead of GET /media/:id/file.
# The API then no longer decides who may fetch a file.
# MEDIA_PUBLIC_BASE_URL=https://cdn.example.com/media
# Detected from the content, never from the client; any of the defaults.
MEDIA_ALLOWED_TYPES=image/jpeg,image/png,image/gif,image/webp,video/mp4,video/webm
# 10 MiB per file.
MEDIA_MAX_BYTES=10485760
# Decoded pixels per image: a guard against decompression bombs.
MEDIA_MAX_PIXELS=40000000
# Uploads not yet attached to a post, per account, and how long they wait.
MEDIA_PENDING_MAX=20
MEDIA_PENDING_TTL_HOURS=24
# Seconds between cleanup sweeps; 0 disables the timer.
MEDIA_SWEEP_INTERVAL_SECONDS=300
# Upload rate limits, besides the write buckets: per IP and per account.
API_MEDIA_UPLOAD_IP_MAX=30
API_MEDIA_UPLOAD_IP_WINDOW_SECONDS=3600
API_MEDIA_UPLOAD_ACCOUNT_MAX=20
API_MEDIA_UPLOAD_ACCOUNT_WINDOW_SECONDS=3600
# Account settings
# Email confirmation and change codes, in seconds (24 h).
EMAIL_VERIFICATION_TTL_SECONDS=86400
EMAIL_CHANGE_TTL_SECONDS=86400
# Personal data exports: how long a ready export can be downloaded, when an
# unfinished build counts as failed, and how often expired payloads are cleared.
DATA_EXPORT_TTL_HOURS=24
DATA_EXPORT_PENDING_TIMEOUT_MINUTES=60
DATA_EXPORT_SWEEP_INTERVAL_SECONDS=600
# Rate limits (per window, in seconds) for the account email routes and exports.
AUTH_EMAIL_VERIFY_REQUEST_ACCOUNT_MAX=3
AUTH_EMAIL_VERIFY_REQUEST_ACCOUNT_WINDOW_SECONDS=3600
AUTH_EMAIL_VERIFY_TOKEN_MAX=5
AUTH_EMAIL_VERIFY_TOKEN_WINDOW_SECONDS=3600
AUTH_EMAIL_CHANGE_ACCOUNT_MAX=3
AUTH_EMAIL_CHANGE_ACCOUNT_WINDOW_SECONDS=3600
API_DATA_EXPORT_ACCOUNT_MAX=3
API_DATA_EXPORT_ACCOUNT_WINDOW_SECONDS=86400
# Community settings (migration 038): how long a denied join request blocks a
# new one, the most flairs per community, and how many fellow members
# GET /communities/recommended reads at most.
COMMUNITY_JOIN_REQUEST_RETRY_HOURS=168
COMMUNITY_FLAIRS_MAX=100
COMMUNITY_RECOMMENDATION_PEERS=1000
# Live notifications (migration 040).
# Web Push: all three or none (push disabled). Generate the pair once per
# deployment with "npm run vapid:keys" (apps/api) and keep it: subscriptions are
# bound to the public key. The subject is a contact for the push services.
VAPID_PUBLIC_KEY=
VAPID_PRIVATE_KEY=
VAPID_SUBJECT=mailto:ops@example.org
# Push service hosts an endpoint may use (subdomains included), comma-separated;
# the default covers Chrome, Firefox, Edge and Safari.
# PUSH_ALLOWED_HOSTS=fcm.googleapis.com,updates.push.services.mozilla.com,push.services.mozilla.com,notify.windows.com,push.apple.com
PUSH_TTL_SECONDS=86400
PUSH_DISPATCH_INTERVAL_SECONDS=5
PUSH_DISPATCH_BATCH=200
# Notifications older than this when dispatched are not pushed.
PUSH_MAX_AGE_SECONDS=3600
# Consecutive failures (other than 404/410, which remove at once) before a
# subscription is removed.
PUSH_MAX_FAILURES=5
PUSH_SUBSCRIPTIONS_PER_ACCOUNT=10
# GET /notifications/stream (Server-Sent Events), per API instance.
NOTIFICATION_STREAMS_PER_ACCOUNT=5
NOTIFICATION_STREAMS_MAX=10000
NOTIFICATION_STREAM_HEARTBEAT_SECONDS=25
NOTIFICATION_STREAM_POLL_MS=2000
NOTIFICATION_STREAM_REVALIDATE_SECONDS=15
NOTIFICATION_STREAM_LOOKBACK_SECONDS=60
NOTIFICATION_STREAM_TICKET_TTL_SECONDS=60
# Behind the compose proxy (docker compose --profile proxy up): its port, and
# set TRUST_PROXY_HOPS=1 for the API.
PROXY_PORT=8080