diff --git a/dockerfile b/dockerfile index 82611336..97936012 100644 --- a/dockerfile +++ b/dockerfile @@ -1,4 +1,5 @@ # DON'T UPDATE TO node:14-bullseye-slim, see #372. +# If the image changed, the second stage image should be changed too FROM node:14-buster-slim AS build WORKDIR /app diff --git a/package.json b/package.json index 2b2c3ad3..7ac5536e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uptime-kuma", - "version": "1.6.0", + "version": "1.6.3", "license": "MIT", "repository": { "type": "git", @@ -23,12 +23,12 @@ "tsc": "tsc", "vite-preview-dist": "vite preview --host", "build-docker": "npm run build-docker-debian && npm run build-docker-alpine", - "build-docker-alpine": "docker buildx build -f dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:alpine -t louislam/uptime-kuma:1-alpine -t louislam/uptime-kuma:1.6.0-alpine --target release . --push", - "build-docker-debian": "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.6.0 -t louislam/uptime-kuma:debian -t louislam/uptime-kuma:1-debian -t louislam/uptime-kuma:1.6.0-debian --target release . --push", + "build-docker-alpine": "docker buildx build -f dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:alpine -t louislam/uptime-kuma:1-alpine -t louislam/uptime-kuma:1.6.3-alpine --target release . --push", + "build-docker-debian": "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.6.3 -t louislam/uptime-kuma:debian -t louislam/uptime-kuma:1-debian -t louislam/uptime-kuma:1.6.3-debian --target release . --push", "build-docker-nightly": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly --target nightly . --push", "build-docker-nightly-alpine": "docker buildx build -f dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly-alpine --target nightly . --push", "build-docker-nightly-amd64": "docker buildx build --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain", - "setup": "git checkout 1.6.0 && npm install --legacy-peer-deps && node node_modules/esbuild/install.js && npm run build && npm prune", + "setup": "git checkout 1.6.3 && npm install --legacy-peer-deps && node node_modules/esbuild/install.js && npm run build && npm prune", "update-version": "node extra/update-version.js", "mark-as-nightly": "node extra/mark-as-nightly.js", "reset-password": "node extra/reset-password.js", diff --git a/server/server.js b/server/server.js index efb2cd2e..f5a8b16e 100644 --- a/server/server.js +++ b/server/server.js @@ -64,15 +64,14 @@ const port = parseInt(process.env.PORT || args.port || 3001); const sslKey = process.env.SSL_KEY || args["ssl-key"] || undefined; const sslCert = process.env.SSL_CERT || args["ssl-cert"] || undefined; -// Data Directory (must be end with "/") -Database.dataDir = process.env.DATA_DIR || args["data-dir"] || "./data/"; -Database.path = Database.dataDir + "kuma.db"; -if (! fs.existsSync(Database.dataDir)) { - fs.mkdirSync(Database.dataDir, { recursive: true }); -} -console.log(`Data Dir: ${Database.dataDir}`); +// Demo Mode? +const demoMode = args["demo"] || false; -console.log("Creating express and socket.io instance"); +if (demoMode) { + console.log("==== Demo Mode ===="); +} + +console.log("Creating express and socket.io instance") const app = express(); let server;