From b0d39b44ce8eedc976fd13111c5b83f0ac73bb79 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Fri, 22 Jul 2022 23:15:55 +0800 Subject: [PATCH] Testing --- docker/debian-base.dockerfile | 2 +- docker/dockerfile | 9 +++++++-- package-lock.json | 2 +- package.json | 3 ++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docker/debian-base.dockerfile b/docker/debian-base.dockerfile index f90968a8b..19d996db5 100644 --- a/docker/debian-base.dockerfile +++ b/docker/debian-base.dockerfile @@ -7,7 +7,7 @@ WORKDIR /app # Install Curl # Install Apprise, add sqlite3 cli for debugging in the future, iputils-ping for ping, util-linux for setpriv -# Stupid python3 and python3-pip actually install a lot of useless things into Debian, specify --no-install-recommends to skip them, make the base even smaller than alpine! +# Stupid python3 and python3-pip actually install a lot of useless things into Debian, specify --no-install-recommends to skip them. RUN apt update && \ apt --yes --no-install-recommends install python3 python3-pip python3-cryptography python3-six python3-yaml python3-click python3-markdown python3-requests python3-requests-oauthlib \ sqlite3 iputils-ping util-linux dumb-init && \ diff --git a/docker/dockerfile b/docker/dockerfile index a9984351b..174775a50 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -20,11 +20,16 @@ HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --retries=5 CMD nod ENTRYPOINT ["/usr/bin/dumb-init", "--", "extra/entrypoint.sh"] CMD ["node", "server/server.js"] +FROM release AS mariadb +# Install MariaDB +RUN apt update && \ + apt --yes --no-install-recommends install mariadb-server && \ + rm -rf /var/lib/apt/lists/* && \ + apt --yes autoremove -FROM release AS nightly +FROM mariadb AS nightly RUN npm run mark-as-nightly - # Upload the artifact to Github FROM louislam/uptime-kuma:base-debian AS upload-artifact WORKDIR / diff --git a/package-lock.json b/package-lock.json index e64f9fa71..d76f5a948 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "badge-maker": "^3.3.1", "bcryptjs": "~2.4.3", "bree": "~7.1.5", - "cacheable-lookup": "^6.0.4", + "cacheable-lookup": "~6.0.4", "chardet": "^1.3.0", "check-password-strength": "^2.0.5", "cheerio": "^1.0.0-rc.10", diff --git a/package.json b/package.json index 676a05581..1fc45546d 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,10 @@ "jest-backend": "cross-env TEST_BACKEND=1 jest --config=./config/jest-backend.config.js", "tsc": "tsc", "vite-preview-dist": "vite preview --host --config ./config/vite.config.js", - "build-docker": "npm run build && npm run build-docker-debian", + "build-docker": "npm run build && npm run build-docker-debian && npm run build-docker-debian-mariadb", "build-docker-debian-base": "docker buildx build -f docker/debian-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-debian . --push", "build-docker-debian": "node ./extra/env2arg.js docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:$VERSION -t louislam/uptime-kuma:debian -t louislam/uptime-kuma:1-debian -t louislam/uptime-kuma:$VERSION-debian --target release . --push", + "build-docker-debian-mariadb": "node ./extra/env2arg.js docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:mariadb -t louislam/uptime-kuma:1-mariadb -t louislam/uptime-kuma:$VERSION-mariadb --target mariadb . --push", "build-docker-nightly": "npm run build && docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly --target nightly . --push", "build-docker-nightly-amd64": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain", "upload-artifacts": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:upload-artifact --build-arg VERSION --build-arg GITHUB_TOKEN --target upload-artifact . --progress plain",