feat: add melli db init to docker services
This commit is contained in:
parent
1ea38add64
commit
0ca9099d31
|
@ -15,3 +15,9 @@ services:
|
|||
image: getmeili/meilisearch:v1.5
|
||||
volumes:
|
||||
- ./melli_data:/meili_data
|
||||
melli_init:
|
||||
build: .
|
||||
command: ["npm", "run", "melli-init"]
|
||||
volumes:
|
||||
- ./data/app.db:/app/prisma/dev.db
|
||||
profiles: ["mellisearch_init"]
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"start": "remix-serve ./build/server/index.js",
|
||||
"typecheck": "tsc",
|
||||
"bridge": "bun run scripts/bridge.mts",
|
||||
"melli-init": "bun run scripts/melli-init.mts",
|
||||
"postinstall": "patch-package"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
import search from "../app/lib/search";
|
||||
|
||||
await search.createIndex("articles", { primaryKey: "id" });
|
||||
|
||||
const index = search.index("articles");
|
||||
|
||||
await index.updateFilterableAttributes(["site", "createdTimestamp"]);
|
Loading…
Reference in New Issue