added env file for production and log statement in hooks for origin
This commit is contained in:
parent
982482e762
commit
897c172dfc
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue