Files
billing/Dockerfile
T
dyc12389andClaude Opus 5.5 0b0aceb773 Family bookkeeping PWA modelled on 木木记账
Hono + SQLite server and a React/shadcn PWA with two-level categories,
who-spent/who-paid splits, settlement, one-line and voice entry, budget
alerts (Web Push and Bark), monthly/annual reports, and 木木 import tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:05:39 +08:00

22 lines
868 B
Docker

FROM node:24-bookworm-slim AS build
WORKDIR /app
# Toolchain for compiling better-sqlite3 when no prebuilt binary matches.
RUN apt-get update && apt-get install -y --no-install-recommends python3 make g++ && rm -rf /var/lib/apt/lists/* && corepack enable
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY server/package.json server/
COPY web/package.json web/
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm --filter web build && pnpm --filter server build \
&& pnpm --filter server deploy --prod /out/server \
&& cp -r server/dist /out/server/dist && cp -r web/dist /out/web
FROM node:24-bookworm-slim
ENV NODE_ENV=production TZ=Asia/Shanghai PORT=3000 DB_PATH=/data/billing.db WEB_DIR=/app/web
WORKDIR /app/server
COPY --from=build /out/server /app/server
COPY --from=build /out/web /app/web
VOLUME /data
EXPOSE 3000
CMD ["node", "dist/index.js"]