mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-03-12 20:34:46 +00:00
Compare commits
3 commits
996ea6e3e9
...
1f001261eb
Author | SHA1 | Date | |
---|---|---|---|
|
1f001261eb | ||
|
65e6f10820 | ||
|
9c4c60e270 |
2 changed files with 10 additions and 1 deletions
|
@ -41,7 +41,7 @@
|
|||
"build-docker-pr-test": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64 -t louislam/uptime-kuma:pr-test2 --target pr-test2 . --push",
|
||||
"upload-artifacts": "node extra/release/upload-artifacts.mjs",
|
||||
"upload-artifacts-beta": "node extra/release/upload-artifacts-beta.mjs",
|
||||
"setup": "git checkout 1.23.15 && npm ci --production && npm run download-dist",
|
||||
"setup": "git checkout 1.23.16 && npm ci --production && npm run download-dist",
|
||||
"download-dist": "node extra/download-dist.js",
|
||||
"mark-as-nightly": "node extra/mark-as-nightly.js",
|
||||
"reset-password": "node extra/reset-password.js",
|
||||
|
|
|
@ -236,6 +236,15 @@ class Database {
|
|||
fs.copyFileSync(Database.templatePath, Database.sqlitePath);
|
||||
}
|
||||
|
||||
// Check if Database.sqlitePath is on NFS
|
||||
if (fs.existsSync(Database.sqlitePath)) {
|
||||
let stats = fs.statSync(Database.sqlitePath);
|
||||
log.debug("server", "SQLite database inode: " + stats.ino);
|
||||
if (stats.ino === 0) {
|
||||
log.error("server", "It seems that the database is on a network drive (NFS). Uptime Kuma will be UNSTABLE and the database will be CORRUPTED. Please use a local disk.");
|
||||
}
|
||||
}
|
||||
|
||||
const Dialect = require("knex/lib/dialects/sqlite3/index.js");
|
||||
Dialect.prototype._driver = () => require("@louislam/sqlite3");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue