docker setup / db changes

This commit is contained in:
Oleksandr Honcharov 2024-06-08 19:50:46 +03:00
parent a3841cf6c3
commit 04012b7976
2 changed files with 7 additions and 1 deletions

View File

@ -2,5 +2,7 @@ services:
app: app:
build: . build: .
command: node build/index.mjs command: node build/index.mjs
volumes:
- ./db/:/app/db/
environment: environment:
- BOT_TOKEN=${BOT_TOKEN} - BOT_TOKEN=${BOT_TOKEN}

View File

@ -1,5 +1,9 @@
import path from 'node:path'
import { QuickDB } from 'quick.db' import { QuickDB } from 'quick.db'
export const db = new QuickDB() import { dirname } from '@discordx/importer'
export const db = new QuickDB({
filePath: path.join(dirname(import.meta.url), '..', 'db', 'json.sqlite'),
})
export enum DBTableEnum { export enum DBTableEnum {
WELCOME_CHANNEL = 'WELCOME_CHANNEL', WELCOME_CHANNEL = 'WELCOME_CHANNEL',