diff --git a/Dockerfile b/Dockerfile index a9edc5f..02681ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,5 +11,6 @@ RUN npm install -g nodemon # RUN npm ci --omit=dev # Bundle app source COPY . . +RUN mkdir -p /usr/src/app/db EXPOSE 3000 CMD [ "node", "app.js" ] diff --git a/db.js b/db.js index 8626bcb..3b87191 100644 --- a/db.js +++ b/db.js @@ -1,7 +1,7 @@ const Database = require('better-sqlite3'); const bcrypt = require('bcrypt'); -const better_sqlite_client = new Database('cspanel.db'); +const better_sqlite_client = new Database('./db/cspanel.db'); better_sqlite_client.exec(` CREATE TABLE IF NOT EXISTS servers (