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:
@@ -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',
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user