Added support for docker volumes
This commit is contained in:
@ -4,11 +4,12 @@ const logger = require('./logger')
|
||||
|
||||
const config = require('../config')
|
||||
const { TimeTracker } = require('./time')
|
||||
const dataFolder = 'data/';
|
||||
|
||||
class Database {
|
||||
constructor (app) {
|
||||
this._app = app
|
||||
this._sql = new sqlite.Database('database.sql')
|
||||
this._sql = new sqlite.Database(dataFolder + 'database.sql')
|
||||
}
|
||||
|
||||
getDailyDatabase () {
|
||||
@ -24,7 +25,7 @@ class Database {
|
||||
this._currentDatabaseCopyInstance.close()
|
||||
}
|
||||
|
||||
this._currentDatabaseCopyInstance = new sqlite.Database(fileName)
|
||||
this._currentDatabaseCopyInstance = new sqlite.Database(dataFolder + fileName)
|
||||
this._currentDatabaseCopyFileName = fileName
|
||||
|
||||
// Ensure the initial tables are created
|
||||
|
Reference in New Issue
Block a user