All checks were successful
Docker / build-and-push (push) Successful in 1m51s
Dockerfile/docker-compose.yml mirror keep's pattern — same better-sqlite3 native-addon build story, same pull_policy: always + named volume for the SQLite DB so redeploys don't lose captured articles. Gitea Actions workflow builds and pushes to the Gitea container registry on push to main (needs a TKNTKN repo secret, same as keep/wisp/npm-statuspage). TESTING.md is the step-by-step for running the server + loading the extension unpacked, written up from what was actually verified end-to-end in the previous session. Verified: image builds, server starts and responds inside the container, capture works, and data survives a container restart. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
26 lines
805 B
Docker
26 lines
805 B
Docker
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
# better-sqlite3 has a native addon with no prebuilt binary for this
|
|
# platform/Node combo yet — build it from source.
|
|
RUN apk add --no-cache python3 make g++
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM node:22-alpine
|
|
WORKDIR /app
|
|
# Same native-addon rebuild needed for the production-only install below;
|
|
# the toolchain is purged again afterward to keep the runtime image lean.
|
|
RUN apk add --no-cache python3 make g++
|
|
COPY package*.json ./
|
|
RUN npm install --omit=dev && apk del python3 make g++
|
|
COPY --from=build /app/dist ./dist
|
|
|
|
# DATA_DIR (SQLite DB) is a mutable runtime volume — not baked into the
|
|
# image, so redeploys don't clobber captured articles.
|
|
ENV DATA_DIR=/app/data
|
|
|
|
EXPOSE 3070
|
|
CMD ["node", "dist/server/index.js"]
|