sitegen/src/source-of-truth.dockerfile
2025-07-09 23:45:21 -07:00

32 lines
650 B
Docker

from node:24 as builder
run apt install -y git
workdir /paperclover.net
copy package*.json ./
run npm ci
copy . ./
run npx esbuild --bundle \
framework/backend/entry-node.ts \
--platform=node \
--format=esm \
--define:globalThis.CLOVER_SERVER_ENTRY='"@/source-of-truth.ts"' \
--minify \
--sourcemap=linked \
--entry-names=index \
--outdir=/app \
&& cp framework/lib/mime.txt /app/
from node:24 as runtime
workdir /app
copy --from=builder /app/ ./
env PORT=43200
# must be configured
env CLOVER_DB=/dev/null
env CLOVER_FILE_RAW=/dev/null
env CLOVER_FILE_DERIVED=/dev/null
cmd ["node", "--enable-source-maps", "/app/index.js"]