Compare commits

..

2 Commits

Author SHA1 Message Date
davidtio
371f2c949d Add SQLite persistence via Docker named volume
Tasks are now stored in SQLite (DB_PATH env var, defaults to ./tasks.db).
Pre-seeding runs only when the table is empty, so upgrades preserve data.
This is the v1.0.0 baseline for the persistence demo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 17:59:26 +08:00
davidtio
78a5f98f11 Fix /data permissions: create directory owned by app user
Docker mounts named volumes as root by default. Without pre-creating /data
in the image with correct ownership, the app user cannot write tasks.db,
causing a 502 on any route that touches TaskStore.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 17:59:20 +08:00
2 changed files with 3 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ RUN sbt "set test in assembly := false" assembly
FROM eclipse-temurin:25-jre-alpine FROM eclipse-temurin:25-jre-alpine
RUN addgroup -S app && adduser -S app -G app RUN addgroup -S app && adduser -S app -G app
RUN mkdir -p /data && chown app:app /data
WORKDIR /app WORKDIR /app
COPY --from=build --chown=app:app /app/target/scala-3.7.1/demoapp.jar ./demoapp.jar COPY --from=build --chown=app:app /app/target/scala-3.7.1/demoapp.jar ./demoapp.jar

View File

@@ -1,8 +1,8 @@
app { app {
name = "DemoCust Tasks" name = "DemoCust Tasks"
version = "2.0.0" version = "1.0.0"
theme { theme {
background = "#1D4ED8" background = "#0F766E"
font = "DM Sans" font = "DM Sans"
fontSize = "16px" fontSize = "16px"
} }