From 040006802b7a84ee89cb06ac58127d326fef2216 Mon Sep 17 00:00:00 2001 From: yourfriendoss Date: Fri, 31 Oct 2025 16:00:17 +0200 Subject: [PATCH] fix console.log, add crappy AI dockerfile --- .dockerignore | 10 ++++++++++ Dockerfile | 26 ++++++++++++++++++++++++++ src/clientAnalytics.js | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7957933 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +node_modules +npm-debug.log* +yarn.lock +pnpm-lock.yaml +.git +.github +.vscode +coverage +dist +.env diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..df66047 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM oven/bun:alpine AS deps +WORKDIR /app + +COPY package.json bun.lock* ./ +RUN bun install --production + +FROM oven/bun:alpine +WORKDIR /app + +COPY package.json bun.lock* ./ +RUN bun install --production + +COPY --from=deps /app/node_modules/geoip-lite/data ./node_modules/geoip-lite/data + +COPY src ./src +COPY tsconfig.json ./ + +ENV NODE_ENV=production \ + PORT=8080 + +EXPOSE 8080 + +HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \ + CMD wget -qO- http://localhost:${PORT}/metrics >/dev/null || exit 1 + +CMD ["bun", "run", "src/server.ts"] diff --git a/src/clientAnalytics.js b/src/clientAnalytics.js index 52d82bf..77f68f0 100644 --- a/src/clientAnalytics.js +++ b/src/clientAnalytics.js @@ -1,7 +1,7 @@ (() => { const API = "some_misc_string"; // this is replaced when JS is requested, do not worry const SITE = "some_site_string"; // same with this - console.log("fuckass_analytics v1 " + API + " on site " + SITE) + console.log("worst analytics ever v1 " + API + " on site " + SITE) const SESSION_ID = crypto.randomUUID(); const USER_ID = localStorage.getItem("analytics_uid") ||