mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Code for @1346
This commit is contained in:
@@ -22,7 +22,7 @@ LOG_CHANNEL=${LOG_CHANNEL}
|
|||||||
|
|
||||||
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
|
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
|
||||||
# If you use SQLite, set connection to `sqlite` and remove the database, username and password settings.
|
# If you use SQLite, set connection to `sqlite` and remove the database, username and password settings.
|
||||||
DB_CONNECTION=mysql
|
DB_CONNECTION=${FF_DB_CONNECTION}
|
||||||
DB_HOST=${FF_DB_HOST}
|
DB_HOST=${FF_DB_HOST}
|
||||||
DB_PORT=${FF_DB_PORT}
|
DB_PORT=${FF_DB_PORT}
|
||||||
DB_DATABASE=${FF_DB_NAME}
|
DB_DATABASE=${FF_DB_NAME}
|
||||||
|
@@ -55,6 +55,9 @@ class Range
|
|||||||
|
|
||||||
// set more view variables:
|
// set more view variables:
|
||||||
$this->configureList();
|
$this->configureList();
|
||||||
|
|
||||||
|
// flash a big fat warning when users use SQLite in Docker
|
||||||
|
$this->loseItAll($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
@@ -99,6 +102,18 @@ class Range
|
|||||||
View::share('defaultCurrency', $defaultCurrency);
|
View::share('defaultCurrency', $defaultCurrency);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Request $request
|
||||||
|
*/
|
||||||
|
private function loseItAll(Request $request)
|
||||||
|
{
|
||||||
|
if (getenv('DB_CONNECTION') === 'sqlite' && getenv('IS_DOCKER') === true) {
|
||||||
|
$request->session()->flash(
|
||||||
|
'error', 'You seem to be using SQLite in a Docker container. Don\'t do this. If the container restarts all your data will be gone.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user