fix console.log, add crappy AI dockerfile

This commit is contained in:
Soph :3 2025-10-31 16:00:17 +02:00
parent f554c7fad8
commit 040006802b
3 changed files with 37 additions and 1 deletions

10
.dockerignore Normal file
View file

@ -0,0 +1,10 @@
node_modules
npm-debug.log*
yarn.lock
pnpm-lock.yaml
.git
.github
.vscode
coverage
dist
.env

26
Dockerfile Normal file
View file

@ -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"]

View file

@ -1,7 +1,7 @@
(() => { (() => {
const API = "some_misc_string"; // this is replaced when JS is requested, do not worry const API = "some_misc_string"; // this is replaced when JS is requested, do not worry
const SITE = "some_site_string"; // same with this 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 SESSION_ID = crypto.randomUUID();
const USER_ID = const USER_ID =
localStorage.getItem("analytics_uid") || localStorage.getItem("analytics_uid") ||