add: docker compose

This commit is contained in:
2026-02-10 02:46:36 +05:30
parent 1f1454b652
commit 1f342283a0
4 changed files with 43 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
import { type BkndConfig, em, entity, text, boolean } from "bknd";
import { type BkndConfig, em, entity, text, boolean, libsql } from "bknd";
// Unrelated to framework adapters
import { registerLocalMediaAdapter } from "bknd/adapter/node";
@@ -19,9 +19,9 @@ declare module "bknd" {
}
export default {
connection: {
url: process.env.DB_URL ?? "file:data.db",
},
connection: libsql({
url: process.env.DATABASE_URL || "http://localhost:8080",
}),
options: {
// the seed option is only executed if the database was empty
seed: async (ctx) => {
@@ -33,7 +33,7 @@ export default {
// and create a user
await ctx.app.module.auth.createUser({
email: "test@bknd.io",
email: "dswbx@bknd.io",
password: "12345678",
});
},