Move stored data to a volume

Fix the silly data wipe on re-deployment by writing the data to a
volume instead of the ephemeral container filesystem.
This commit is contained in:
Hornwitser 2025-03-05 18:42:56 +01:00
parent 6ea3567c94
commit 5cc310384e
5 changed files with 7 additions and 97 deletions

View file

@ -4,8 +4,8 @@ import { Schedule } from "~/shared/types/schedule";
// For this demo I'm just storing the runtime data in JSON files. When making
// this into proper application this should be replaced with an actual database.
const schedulePath = "schedule.json"
const subscriptionsPath = "push-subscriptions.json"
const schedulePath = "data/schedule.json"
const subscriptionsPath = "data/subscriptions.json"
export async function readSchedule() {
let schedule: Schedule;