forked from pinks/eris
1
0
Fork 0

add env var for db path

This commit is contained in:
pinks 2023-10-18 23:11:25 +02:00
parent 4ba6f494d2
commit 22d9c518be
2 changed files with 7 additions and 6 deletions

View File

@ -14,15 +14,16 @@ You can put these in `.env` file or pass them as environment variables.
- `TG_BOT_TOKEN` - Telegram bot token. Get yours from [@BotFather](https://t.me/BotFather). - `TG_BOT_TOKEN` - Telegram bot token. Get yours from [@BotFather](https://t.me/BotFather).
Required. Required.
- `TG_ADMIN_USERNAMES` - Comma separated list of usernames of users that can use admin commands. - `TG_ADMIN_USERNAMES` - Comma separated list of usernames of users that can use admin commands.
- `DENO_KV_PATH` - [Deno KV](https://deno.land/api?s=Deno.openKv&unstable) database file path. A
temporary file is used by default.
- `LOG_LEVEL` - [Log level](https://deno.land/std@0.201.0/log/mod.ts?s=LogLevels). Default: `INFO`. - `LOG_LEVEL` - [Log level](https://deno.land/std@0.201.0/log/mod.ts?s=LogLevels). Default: `INFO`.
You can configure more stuff in [Eris WebUI](http://localhost:5999/) when running.
## Running ## Running
- Start stable diffusion webui: `cd sd-webui`, `./webui.sh --api` - Start Stable Diffusion WebUI: `./webui.sh --api` (in SD WebUI directory)
- Start bot: `deno task start` - Start Eris: `deno task start`
To connect your SD to the bot, open the [Eris UI](http://localhost:5999/), login as admin and add a
worker.
## Codegen ## Codegen

View File

@ -1,4 +1,4 @@
import { KvFs } from "kvfs"; import { KvFs } from "kvfs";
export const db = await Deno.openKv("./app.db"); export const db = await Deno.openKv(Deno.env.get("DENO_KV_PATH"));
export const fs = new KvFs(db); export const fs = new KvFs(db);