From b2c58447a1ed4fe0f79aadcff2e60f09a80dfdd6 Mon Sep 17 00:00:00 2001 From: lukashow Date: Tue, 3 Feb 2026 20:11:54 +0800 Subject: [PATCH] fix(db): Implement Pocketbsse http kwargs for accurate database startup --- tools/src/constants/db.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/src/constants/db.ts b/tools/src/constants/db.ts index b5c22dcb4..d17937280 100644 --- a/tools/src/constants/db.ts +++ b/tools/src/constants/db.ts @@ -26,10 +26,14 @@ export const PB_BINARY_PATH = path.resolve( process.env.PB_BINARY_PATH || `${PB_DIR}/pocketbase` ) +// Remove http:// prefix if present +export const PB_HOST = getEnvVar('PB_HOST').replace(/^http:\/\//, '') + export const PB_KWARGS = [ `--dir=${PB_DATA_DIR}`, `--migrationsDir=${PB_MIGRATIONS_DIR}`, - '--automigrate=0' + '--automigrate=0', + `--http ${PB_HOST || 'localhost:8090'}` ] // Straightaway exit if PB_DIR is not accessible (skip in Docker mode)