1# The source of truth server: file serving + the auto-indexer service.
2# No bundling step; the whole source tree plus node_modules ship in the
3# image and `node run` executes it the same way development does.
4#
5# trixie rather than bookworm: the dimensions processor needs the `magick`
6# entry point, which is ImageMagick 7 (bookworm only packages v6).
7from node:24-trixie
8
9# media processors shell out to these. exiftool is `libimage-exiftool-perl`
10# on debian; curl is for the compose healthcheck.
11run apt-get update && apt-get install -y --no-install-recommends \
12 ffmpeg \
13 imagemagick \
14 libimage-exiftool-perl \
15 curl \
16 && rm -rf /var/lib/apt/lists/*
17
18workdir /app
19copy package.json package-lock.json ./
20run npm ci --no-audit --no-fund
21copy . .
22# prime run.js's dependency hash so container boot never re-runs npm
23run node run || true
24
25env PORT=80
26# must be configured
27env CLOVER_DB=/dev/null
28env CLOVER_FILE_RAW=/dev/null
29env CLOVER_FILE_DERIVED=/dev/null
30
31cmd ["node", "run", "source-of-truth"]