v3: performance pass, bundle size pass, i18n pass, docker pass

This commit is contained in:
khannurien
2026-04-08 13:19:39 +00:00
parent 20b9bfe7b4
commit 1321e374bf
21 changed files with 502 additions and 301 deletions

View File

@@ -1,14 +1,15 @@
# ── Stage 1: build Vite frontend ─────────────────────────────────────────────
FROM denoland/deno:2.7.5 AS builder
FROM denoland/deno:2.7.11 AS builder
WORKDIR /app
COPY deno.json deno.lock package.json ./
COPY tsconfig*.json vite.config.ts ./
COPY tsconfig*.json vite.config.ts lingui.config.ts ./
RUN deno install
COPY index.html ./
COPY public/ ./public/
COPY scripts/ ./scripts/
COPY src/ ./src/
# In same-origin deployments (API serves the frontend), no build args are needed
@@ -24,7 +25,9 @@ ENV VITE_API_PROTOCOL=$VITE_API_PROTOCOL \
RUN deno task build
# ── Stage 2: runtime ──────────────────────────────────────────────────────────
FROM denoland/deno:2.7.5
FROM denoland/deno:2.7.11
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*
WORKDIR /app
@@ -35,9 +38,9 @@ COPY api/ ./api/
COPY --from=builder /app/dist/ ./dist/
COPY public/ ./public/
# Persistent data: database and user uploads must be mounted as volumes.
# Persistent data: database and uploaded/generated files must be mounted as volumes.
VOLUME ["/app/api/sql", "/app/api/uploads"]
EXPOSE 8000
CMD ["sh", "-c", "deno run -A api/sql/init.ts && exec deno run -A api/main.ts"]
CMD ["deno", "task", "start"]