Add Docker Compose deployment
Full node_modules image (not output: standalone — its file-tracing drops argon2's JS loader and segfaults in prod). drizzle.config.ts now honors DATA_DIR like the sibling projects, so db:migrate targets the mounted volume instead of an image-local path.
This commit is contained in:
1 parent
3e7318364b
commit
8d76c4d797
4 files changed
+60
-1
No files matched your search
+4
-1
@@ -1,10 +1,13 @@
|
||||
import { defineConfig } from "drizzle-kit";
|
||||
import path from "node:path";
|
||||
|
||||
const dataDir = process.env.DATA_DIR ?? path.join(process.cwd(), "data");
|
||||
|
||||
export default defineConfig({
|
||||
out: "./src/lib/db/migrations",
|
||||
schema: "./src/lib/db/schema.ts",
|
||||
dialect: "sqlite",
|
||||
dbCredentials: {
|
||||
url: "./data/db.sqlite",
|
||||
url: path.join(dataDir, "db.sqlite"),
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user