diff options
| author | yyamashita <yyamashita@mosquit.one> | 2026-05-09 00:38:42 +0900 |
|---|---|---|
| committer | yyamashita <yyamashita@mosquit.one> | 2026-05-09 00:38:42 +0900 |
| commit | 446ffe83a2043636ffe99691454e843ef9fb179f (patch) | |
| tree | 8a5e4437f815715461cfa84964f710a6943678a4 /app/lib | |
| parent | b8d24d292d99c8da285092ce923b5e2b546d8f45 (diff) | |
Fix Docker startup: add package.json to app stage, respect DB_PATH
npm start requires package.json in the working directory. Also wire
up the DB_PATH env var so the DB is created inside the mounted volume.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/db.server.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/db.server.ts b/app/lib/db.server.ts index f1cacbb..dd9184d 100644 --- a/app/lib/db.server.ts +++ b/app/lib/db.server.ts @@ -5,7 +5,7 @@ let db: Database.Database | null = null; export function getDb(): Database.Database { if (!db) { - const dbPath = path.resolve("whois.db"); + const dbPath = process.env.DB_PATH ?? path.resolve("whois.db"); db = new Database(dbPath); db.pragma("journal_mode = WAL"); db.pragma("foreign_keys = ON"); |
