mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-30 18:24:03 +00:00
add demo db
This commit is contained in:
parent
f23ecef636
commit
b1647a310e
3 changed files with 8 additions and 2 deletions
BIN
db/demo_kuma.db
Normal file
BIN
db/demo_kuma.db
Normal file
Binary file not shown.
|
@ -16,8 +16,6 @@
|
||||||
"dev": "vite --host",
|
"dev": "vite --host",
|
||||||
"start": "npm run start-server",
|
"start": "npm run start-server",
|
||||||
"start-server": "node server/server.js",
|
"start-server": "node server/server.js",
|
||||||
"start-demo-server": "set NODE_ENV=demo && node server/server.js",
|
|
||||||
"update": "",
|
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"vite-preview-dist": "vite preview --host",
|
"vite-preview-dist": "vite preview --host",
|
||||||
"build-docker": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.5.2 --target release . --push",
|
"build-docker": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.5.2 --target release . --push",
|
||||||
|
|
|
@ -50,6 +50,14 @@ const port = parseInt(process.env.PORT || args.port || 3001);
|
||||||
const sslKey = process.env.SSL_KEY || args["ssl-key"] || undefined;
|
const sslKey = process.env.SSL_KEY || args["ssl-key"] || undefined;
|
||||||
const sslCert = process.env.SSL_CERT || args["ssl-cert"] || undefined;
|
const sslCert = process.env.SSL_CERT || args["ssl-cert"] || undefined;
|
||||||
|
|
||||||
|
// Demo Mode?
|
||||||
|
const demoMode = args["demo"] || false;
|
||||||
|
|
||||||
|
if (demoMode) {
|
||||||
|
console.log("==== Demo Mode ====");
|
||||||
|
Database.templatePath = "./demo_kuma.db";
|
||||||
|
}
|
||||||
|
|
||||||
// Data Directory (must be end with "/")
|
// Data Directory (must be end with "/")
|
||||||
Database.dataDir = process.env.DATA_DIR || args["data-dir"] || "./data/";
|
Database.dataDir = process.env.DATA_DIR || args["data-dir"] || "./data/";
|
||||||
Database.path = Database.dataDir + "kuma.db";
|
Database.path = Database.dataDir + "kuma.db";
|
||||||
|
|
Loading…
Reference in a new issue