From f7c9daefca716f1e9c51fc1ea500f1bd5c5f7112 Mon Sep 17 00:00:00 2001 From: Blacky <77108939+brblacky@users.noreply.github.com> Date: Sun, 18 Feb 2024 11:52:24 +0530 Subject: [PATCH] fixed some bugs - v4.0.7 --- Dockerfile | 4 ++++ {src/database => database}/lavamusic.db | 0 docker-compose.yml | 2 +- package.json | 5 ++--- src/database/server.ts | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) rename {src/database => database}/lavamusic.db (100%) diff --git a/Dockerfile b/Dockerfile index 03a16e74c..b46a2cb4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,9 +8,13 @@ COPY package*.json ./ RUN apt-get update && \ apt-get install -y && \ npm install + # Copy source code COPY . . +# Copy tsconfig.json +COPY tsconfig.json ./ + # Build TypeScript RUN npm run build diff --git a/src/database/lavamusic.db b/database/lavamusic.db similarity index 100% rename from src/database/lavamusic.db rename to database/lavamusic.db diff --git a/docker-compose.yml b/docker-compose.yml index 0f59b5be2..3e0c2c38a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,7 +40,7 @@ services: volumes: # mount .env from the same directory or use environment variables - .env:/opt/lavamusic/.env - #- ./database:/opt/lavamusic/database + - ./database:/opt/lavamusic/database restart: on-failure depends_on: lavalink: diff --git a/package.json b/package.json index 7a1529c3b..a765d4fa8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lavamusic", - "version": "4.0.6", + "version": "4.0.7", "description": "LavaMusic is a music bot for Discord, written in JavaScript using the Discord.js, Typescript, Shoukaku (Lavalink) library.", "main": "dist/index.js", "type": "module", @@ -11,8 +11,7 @@ "lint": "eslint . --cache --ext .js,.jsx,.ts,.tsx", "lint:fix": "eslint . --fix --cache --ext .js,.jsx,.ts,.tsx", "format": "prettier --check .", - "format:fix": "prettier --write .", - "postinstall": "npm run build && node dist/index.js" + "format:fix": "prettier --write ." }, "repository": { "type": "git", diff --git a/src/database/server.ts b/src/database/server.ts index 50d33b488..17c7615dc 100644 --- a/src/database/server.ts +++ b/src/database/server.ts @@ -2,7 +2,7 @@ import Database from 'better-sqlite3'; import config from '../config.js'; -const db = new Database('./dist/database/lavamusic.db', { +const db = new Database('./database/lavamusic.db', { fileMustExist: false, readonly: false, });