feat: add runtime configuration for Caddy-based SPA containerization

Introduced `config.json` runtime configuration fetch mechanism to support the "Build Once, Deploy Everywhere" pattern. Replaced NGINX with Caddy for SPA deployment, enabling SPA routing, security headers, and static asset management. Updated Gradle and Kotlin/JS build configurations to align with the new runtime environment. Enhanced Dockerfile and health checks for optimized CI/CD workflows and improved SPA delivery.
This commit is contained in:
2026-02-02 16:19:20 +01:00
parent 86d8d780f5
commit 11c597f147
17 changed files with 327 additions and 193 deletions
+2 -25
View File
@@ -9,39 +9,23 @@ plugins {
}
kotlin {
// Toolchain is now handled centrally in the root build.gradle.kts
jvm()
js {
binaries.library()
browser {
testTask { enabled = false }
testTask { enabled = false }
}
}
// Wasm vorerst deaktiviert
/*
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
wasmJs { browser() }
*/
sourceSets {
commonMain.dependencies {
// Ktor Client core + JSON and Auth + Logging + Timeouts + Retry
api(libs.ktor.client.core)
implementation(libs.ktor.client.contentNegotiation)
implementation(libs.ktor.client.serialization.kotlinx.json)
implementation(libs.ktor.client.auth)
implementation(libs.ktor.client.logging)
// ktor-client-resources optional; disabled until version is added to catalog
// Kotlinx core bundles
implementation(libs.kotlinx.coroutines.core)
// DI (Koin)
api(libs.koin.core)
// Project modules via typesafe accessors
// (none here; kept for consistency)
}
jvmMain.dependencies {
@@ -51,13 +35,6 @@ kotlin {
jsMain.dependencies {
implementation(libs.ktor.client.js)
}
/*
val wasmJsMain = getByName("wasmJsMain")
wasmJsMain.dependencies {
implementation(libs.ktor.client.js)
}
*/
}
}