Rebuild the admin dashboard as a Svelte 5 + TypeScript app

Frontend in web/ (Vite via bun, pure CSS, no component libraries),
built to internal/dashboard/dist and embedded into the binary; the
Dockerfile builds it in a bun stage. Old static dashboard.html removed.
This commit is contained in:
2026-10-25 16:34:21 +08:00
parent f5fcdd7bbb
commit bc52af33cf
24 changed files with 760 additions and 183 deletions
+8
View File
@@ -3,12 +3,20 @@
# Deploy on Coolify (or any Docker host) with host port mappings
# 443 -> 8443 and 80 -> 8080 and a volume on /app/data; see README.md.
FROM oven/bun:1 AS web
WORKDIR /src/web
COPY web/package.json web/bun.lock ./
RUN bun install --frozen-lockfile
COPY web ./
RUN bun run build
FROM golang:1.27-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY cmd ./cmd
COPY internal ./internal
COPY --from=web /src/internal/dashboard/dist ./internal/dashboard/dist
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/tunneld ./cmd/tunneld
FROM alpine:3.21