added env file for production and log statement in hooks for origin

This commit is contained in:
Patrick 2025-07-26 18:42:23 +02:00
parent 982482e762
commit 897c172dfc
2 changed files with 5 additions and 0 deletions

View File

@ -13,6 +13,8 @@ services:
environment:
APP_USER_DATA_PATH: "/app-data"
APP_LOG_PATH: "/app-data/logs"
env_file:
- .env.production
volumes:
- type: volume
source: user-data

View File

@ -1,6 +1,8 @@
import type { Handle } from "@sveltejs/kit";
import { error, redirect } from "@sveltejs/kit";
import { env } from "$env/dynamic/private"
import SessionStore from "$lib/server/session_store"
import { init_db, close_db, create_user } from "$lib/server/database";
@ -16,6 +18,7 @@ let local_setup = {
async function init() {
Logs.process.info("Initializing server");
Logs.process.debug(`ORIGIN: ${env.ORIGIN}`);
if (process.env.APP_USER_DATA_PATH == null) {
throw new Error("APP_USER_DATA_PATH is not defined. Exiting.");