feat: migrate from npm to bun and fix analytics map height

Switch package manager and runtime from Node.js/npm to Bun across
Docker, CI, and scripts. The SQLite driver remains better-sqlite3
due to Next.js Turbopack being unable to resolve bun:sqlite during
build-time page pre-rendering.

Also fix the world map not rendering in the analytics page — the
overflowX wrapper added for mobile broke the flex height chain,
collapsing the map to 0px.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
fuomag9
2026-03-21 01:48:21 +01:00
parent 4b5323a7bf
commit b5625e5a96
10 changed files with 1115 additions and 7946 deletions

View File

@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.6
FROM node:25-slim AS base
FROM oven/bun:1-slim AS base
WORKDIR /app
FROM base AS deps
@@ -12,9 +12,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
openssl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY package.json package-lock.json* ./
# Install dependencies
RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
FROM base AS builder
ENV NODE_ENV=production
@@ -25,7 +24,7 @@ ENV DATABASE_URL=file:/tmp/build.db
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Build the Next.js application
RUN npm run build && rm -f /tmp/build.db
RUN bun run build && rm -f /tmp/build.db
FROM base AS runner
# Accept build args for user/group IDs to support rootless operation