docs(bots/discord): document extra deployment step

This commit is contained in:
PalmDevs
2024-07-21 01:33:52 +07:00
parent 73b2169a5a
commit 67ba3bdb90
2 changed files with 8 additions and 3 deletions

View File

@@ -23,7 +23,6 @@ bun run build
The distribution files will be placed inside the `dist` directory. Inside will include:
- The default configuration for the bot
- An empty database for the bot with schemas configured
- Compiled source files of the bot
## ✈️ Deploying
@@ -49,7 +48,13 @@ To deploy the bot, you'll need to:
cp -R ./dist/* /usr/src/discord-bot
```
5. Replace the default empty database with your own _(optional)_
5. Copy the empty database (or use your own existing database)
```sh
# By default, the build script creates the database called "db.sqlite3"
# Unless you specify otherwise via the "DATABASE_PATH" environment variable
cp ./db.sqlite3 /usr/src/discord-bot
```
6. Configure environment variables
As seen in [`.env.example`](../.env.example). You can also optionally use a `.env` file which **Bun will automatically load**.

View File

@@ -10,7 +10,7 @@
"start": "bun prepare && bun run src/index.ts",
"dev": "bun prepare && bun --watch src/index.ts",
"build:config": "bun build config.ts --outdir=dist",
"build": "bun prepare && bun build:config && bun build src/index.ts -e ./config.js --target=bun --outdir=dist/src && drizzle-kit push",
"build": "bun prepare && bun build:config && bun build src/index.ts -e ./config.js --target=bun --outdir=dist/src",
"watch": "bun dev",
"prepare": "bun run scripts/generate-indexes.ts && drizzle-kit push"
},