prevent startup if migrating not possible
This commit is contained in:
parent
f66fdc34f1
commit
24d34597ff
3 changed files with 3 additions and 3 deletions
|
@ -35,4 +35,4 @@ COPY --from=install /temp/prod/node_modules node_modules
|
||||||
COPY --from=prerelease /app/ .
|
COPY --from=prerelease /app/ .
|
||||||
|
|
||||||
# run the app
|
# run the app
|
||||||
ENTRYPOINT [ "bun", "run", "start" ]
|
ENTRYPOINT [ "bun", "start" ]
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"generate": "bunx --bun drizzle-kit generate --config=./drizzle.config.ts",
|
"generate": "bunx --bun drizzle-kit generate --config=./drizzle.config.ts",
|
||||||
"studio": "bunx --bun drizzle-kit studio --config=./drizzle.config.ts",
|
"studio": "bunx --bun drizzle-kit studio --config=./drizzle.config.ts",
|
||||||
"up": "drizzle-kit up --config=./drizzle.config.ts",
|
"up": "drizzle-kit up --config=./drizzle.config.ts",
|
||||||
"start": "bun run src/server.ts",
|
"start": "bun migrate && bun src/server.ts",
|
||||||
"dev": "bun run --watch src/server.ts",
|
"dev": "bun run --watch src/server.ts",
|
||||||
"lint": "oxlint .",
|
"lint": "oxlint .",
|
||||||
"format": "prettier --write ."
|
"format": "prettier --write ."
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { drizzle } from 'drizzle-orm/bun-sqlite';
|
||||||
import { createWrappedTimer } from '../wrapped-timer';
|
import { createWrappedTimer } from '../wrapped-timer';
|
||||||
|
|
||||||
function initDb() {
|
function initDb() {
|
||||||
global.db.exec('PRAGMA journal_mode = delete');
|
// global.db.exec('PRAGMA journal_mode = delete');
|
||||||
global.db.exec('PRAGMA journal_mode = WAL');
|
global.db.exec('PRAGMA journal_mode = WAL');
|
||||||
global.db.exec('PRAGMA synchronous = NORMAL');
|
global.db.exec('PRAGMA synchronous = NORMAL');
|
||||||
global.db.exec('PRAGMA auto_vacuum = INCREMENTAL');
|
global.db.exec('PRAGMA auto_vacuum = INCREMENTAL');
|
||||||
|
|
Loading…
Add table
Reference in a new issue