Repository navigation
Expand file tree
/
Copy pathapplication.conf.dev.example
More file actions
243 lines (235 loc) · 9.82 KB
/
Copy pathapplication.conf.dev.example
File metadata and controls
243 lines (235 loc) · 9.82 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# Kalendee -- full HOCON configuration (development example).
#
# Copy to application.conf.dev and docker-compose.dev.yml mounts it at
# /config/application.conf:
#
# cp application.conf.dev.example application.conf.dev
# # then, if not already done:
# cp .env.dev.example .env.dev
# docker compose -f docker-compose.dev.yml up
#
# Precedence, highest first:
# 1. A `-config=/path` argument passed to the container entrypoint.
# 2. The file KALENDEE_CONFIG points at (mounted config, e.g. /config/...).
# 3. The config baked into the image at /app/application.conf.
# 4. Defaults embedded in the jar (server/src/main/resources/application.conf).
# Environment variables are substitutions *inside* whichever file wins: every
# value below is followed by a `${?VAR}` fallback.
#
# Note for local `:server:run` (desktop, not the dev container): the Gradle run
# task loads .env.local itself and process environment variables win over the
# file, so an exported KALENDEE_CONFIG works there too.
#
# This is a complete standalone config: it does not rely on Ktor merging it
# with the config embedded in the jar, so it must carry the `ktor.application`
# module entry point.
ktor {
# Development mode in Ktor terms (verbose errors). Mirrors app.development.
development = true
deployment {
# Port bound inside the dev container. The compose port mapping decides
# which host port reaches it.
port = 8080
port = ${?KALENDEE_HTTP_PORT}
host = "0.0.0.0"
host = ${?KALENDEE_HTTP_HOST}
}
application {
modules = [ dev.kolektiv.kalendee.ApplicationKt.module ]
}
}
# JDBC connection settings. Inside docker-compose.dev.yml the database host is
# the `postgres` service. For a host-run `./gradlew :server:run` without the dev
# stack, point KALENDEE_DATABASE_URL at 127.0.0.1 instead.
database {
url = "jdbc:postgresql://postgres:5432/kalendee"
url = ${?KALENDEE_DATABASE_URL}
user = "kalendee"
user = ${?KALENDEE_DATABASE_USER}
password = "kalendee"
password = ${?KALENDEE_DATABASE_PASSWORD}
}
auth {
# Public registration policy: "first-user", "open", or "closed".
registration = "first-user"
registration = ${?KALENDEE_AUTH_REGISTRATION}
# Session lifetime in days.
sessionDays = 30
sessionDays = ${?KALENDEE_AUTH_SESSION_DAYS}
# Session cookie name.
cookieName = "kalendee_session"
cookieName = ${?KALENDEE_SESSION_COOKIE_NAME}
# Development default: plain HTTP on localhost, so cookies must not require
# TLS. Set KALENDEE_COOKIE_SECURE=true to test HTTPS locally.
cookieSecure = false
cookieSecure = ${?KALENDEE_COOKIE_SECURE}
# Username of the admin seeded on first startup.
adminUsername = "admin"
adminUsername = ${?KALENDEE_ADMIN_USERNAME}
# Development-only password; never reuse outside a local dev stack.
adminPassword = "admin"
adminPassword = ${?KALENDEE_ADMIN_PASSWORD}
# Optional username granted superadmin rights.
superadminUsername = ${?KALENDEE_SUPERADMIN_USERNAME}
# Email verification policy: "required", "optional", or "off".
emailVerification = "optional"
emailVerification = ${?KALENDEE_AUTH_EMAIL_VERIFICATION}
# Verification email lifetime in hours.
emailVerificationTtlHours = 24
emailVerificationTtlHours = ${?KALENDEE_AUTH_EMAIL_VERIFICATION_TTL_HOURS}
# Allow OAuth sign-ins to create new accounts (still gated by `registration`).
oauthRegistration = false
oauthRegistration = ${?KALENDEE_AUTH_OAUTH_REGISTRATION}
argon2 {
memoryKib = 19456
memoryKib = ${?KALENDEE_ARGON2_MEMORY_KIB}
iterations = 2
iterations = ${?KALENDEE_ARGON2_ITERATIONS}
parallelism = 1
parallelism = ${?KALENDEE_ARGON2_PARALLELISM}
}
}
app {
# Local development URL. Plain HTTP: TLS is not terminated in front of the
# dev container.
baseUrl = "http://localhost:8080"
baseUrl = ${?KALENDEE_PUBLIC_URL}
baseUrl = ${?KALENDEE_BASE_URL}
# Development mode: pretty error page and localhost base URL default.
development = true
development = ${?KALENDEE_DEVELOPMENT}
# Instance-wide default for anonymous access to public calendars:
# "public" or "signed_in". Per-user and per-calendar overrides win.
publicAccess = "public"
publicAccess = ${?KALENDEE_PUBLIC_ACCESS}
# Seed a demo user with sample calendars/events on startup. Intended for
# development and for capturing screenshots; never enable in production.
# Log in as demo / demo.
seedDemo = true
seedDemo = ${?KALENDEE_SEED_DEMO}
demoPassword = "demo"
demoPassword = ${?KALENDEE_DEMO_PASSWORD}
demoTimezone = "Europe/Berlin"
demoTimezone = ${?KALENDEE_DEMO_TIMEZONE}
}
# External calendar connections. Providers with a blank client id are disabled.
# The OAuth client secrets below are secrets: supply them through .env.dev.
oauth {
discord {
# Discord OAuth client id; blank disables the provider.
clientId = ${?KALENDEE_DISCORD_CLIENT_ID}
# Discord OAuth client secret.
clientSecret = ${?KALENDEE_DISCORD_CLIENT_SECRET}
# Bot token for reading guild scheduled events. Invite the bot to the
# guild first; optional, user linking works without it.
botToken = ${?KALENDEE_DISCORD_BOT_TOKEN}
}
google {
# Google OAuth client id; blank disables the provider.
clientId = ${?KALENDEE_GOOGLE_CLIENT_ID}
clientSecret = ${?KALENDEE_GOOGLE_CLIENT_SECRET}
}
# Token-encryption keys: KALENDEE_SECRET_KEY is a base64 32-byte key (version 1);
# KALENDEE_SECRET_KEYS is an optional JSON object for rotation, e.g.
# { "1": "<base64>", "2": "<base64>" }.
secretKey = ${?KALENDEE_SECRET_KEY}
secretKeys = ${?KALENDEE_SECRET_KEYS}
}
mail {
# Master switch for outgoing mail. In development the default transport
# logs messages instead of sending them, so this can stay false while
# exercising verification/reminder flows.
enabled = false
enabled = ${?KALENDEE_MAIL_ENABLED}
# Mail transport: "smtp", "cloudflare", "mailgun", or "log". Blank
# auto-detects: SMTP when `host` is set, otherwise Cloudflare when its
# endpoint/token are set, otherwise Mailgun when its apiKey/domain are set,
# otherwise the logging mailer. Force "log" to capture mail in the server
# log even if SMTP values leak in from the environment. Note that
# Cloudflare's send_email binding is a paid Email Routing feature; Mailgun
# is the non-SMTP alternative.
provider = ""
provider = ${?KALENDEE_MAIL_PROVIDER}
# SMTP host; blank disables SMTP.
host = ""
host = ${?KALENDEE_SMTP_HOST}
port = 587
port = ${?KALENDEE_SMTP_PORT}
username = ""
username = ${?KALENDEE_SMTP_USER}
password = ""
password = ${?KALENDEE_SMTP_PASSWORD}
from = "Kalendee <no-reply@localhost>"
from = ${?KALENDEE_MAIL_FROM}
# Enable STARTTLS on the SMTP connection.
startTls = true
startTls = ${?KALENDEE_SMTP_STARTTLS}
# Cloudflare Email Routing bridge (workers/mailer). Optional; see
# workers/mailer/README.md. The token is the Worker's MAILER_TOKEN.
cloudflare {
# Base URL of the deployed mailer Worker, e.g.
# https://kalendee-mailer.<your-subdomain>.workers.dev
endpoint = ""
endpoint = ${?KALENDEE_MAIL_CLOUDFLARE_ENDPOINT}
# Bearer token the Worker expects. Secret: supply via .env.dev.
token = ""
token = ${?KALENDEE_MAIL_CLOUDFLARE_TOKEN}
# Request timeout in seconds.
timeoutSeconds = 10
timeoutSeconds = ${?KALENDEE_MAIL_CLOUDFLARE_TIMEOUT_SECONDS}
}
# Mailgun HTTP API. Optional locally; use a sandbox domain or a test key.
mailgun {
# Private API key (secret: supply via .env.dev).
apiKey = ${?KALENDEE_MAILGUN_API_KEY}
# Sending domain verified in Mailgun.
domain = ${?KALENDEE_MAILGUN_DOMAIN}
# Control-plane region: "us" or "eu".
region = "us"
region = ${?KALENDEE_MAILGUN_REGION}
# Optional API base URL override; blank derives it from `region`.
baseUrl = ""
baseUrl = ${?KALENDEE_MAILGUN_BASE_URL}
# Request timeout in seconds.
timeoutSeconds = 10
timeoutSeconds = ${?KALENDEE_MAILGUN_TIMEOUT_SECONDS}
}
}
storage {
# Directory backing local object storage. The repo is bind-mounted at /src
# in the dev container, so avatars land under /src/build and are visible on
# the host; override with KALENDEE_AVATAR_DIR if you prefer elsewhere.
localDir = "/src/build/avatars"
localDir = ${?KALENDEE_AVATAR_DIR}
# Optional public base URL for objects. Leave blank locally: avatar reads
# are proxied through the server.
publicBaseUrl = ""
publicBaseUrl = ${?KALENDEE_STORAGE_PUBLIC_URL}
# S3-compatible object storage. Leave disabled for local development.
s3 {
enabled = false
enabled = ${?KALENDEE_S3_ENABLED}
# Endpoint; set for non-AWS providers such as Cloudflare R2.
endpoint = ""
endpoint = ${?KALENDEE_S3_ENDPOINT}
# Region. "auto" for Cloudflare R2, otherwise a real region.
region = "us-east-1"
region = ${?KALENDEE_S3_REGION}
# Bucket name.
bucket = ""
bucket = ${?KALENDEE_S3_BUCKET}
# Access key id; blank falls back to the SDK default credential chain.
accessKey = ${?KALENDEE_S3_ACCESS_KEY}
# Secret access key. Secret: supply via .env.dev.
secretKey = ${?KALENDEE_S3_SECRET_KEY}
# Use path-style addressing. Required by Cloudflare R2.
pathStyle = true
pathStyle = ${?KALENDEE_S3_PATH_STYLE}
}
}
keel {
# Exploded Keel pack directory. .env.dev.example points this at the pack
# build output inside the bind-mounted source tree; omit it to use the pack
# bundled into the jar.
packDir = ${?KALENDEE_KEEL_PACK}
}