32 lines
628 B
Text
32 lines
628 B
Text
|
from node:24-alpine as builder
|
||
|
|
||
|
run apk add --no-cache 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
|
||
|
|
||
|
from node:24-alpine as runtime
|
||
|
|
||
|
workdir /app
|
||
|
copy --from=builder /app/ ./
|
||
|
|
||
|
env PORT=3001
|
||
|
# 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"]
|
||
|
|