feat(docker): add multi-stage image and compose with persistent SQLite

Mount ./docker-data for WAL-capable SQLite storage, support DATABASE_PATH alias, and document compose secrets via .env.docker.example.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-05 08:21:51 +02:00
co-authored by Cursor
parent e42386a5ee
commit 1261a9b482
7 changed files with 105 additions and 4 deletions
+6 -1
View File
@@ -19,6 +19,11 @@ export class EnvironmentVariables {
@IsString()
DB_PATH?: string
/** Alias for DB_PATH (e.g. Docker Compose). DB_PATH takes precedence when both are set. */
@IsOptional()
@IsString()
DATABASE_PATH?: string
@IsOptional()
@IsString()
JWT_SECRET?: string
@@ -43,7 +48,7 @@ export function validateEnv(config: Record<string, unknown>): EnvironmentVariabl
PORT: Number(config.PORT ?? 3001),
HOST: (config.HOST as string | undefined) ?? '0.0.0.0',
CORS_ORIGIN: (config.CORS_ORIGIN as string | undefined) ?? 'http://localhost:5173',
DB_PATH: config.DB_PATH as string | undefined,
DB_PATH: (config.DB_PATH ?? config.DATABASE_PATH) as string | undefined,
JWT_SECRET: jwtSecret ?? 'gold-land-dev-secret-change-in-production',
}