diff --git a/framework/backend/entry-node.ts b/framework/backend/entry-node.ts index d934c84353c66ea5767a25695af66ddada5835ae..4f4a24902e94c56f5d6c4111b8192a75a31028c6 100644 --- a/framework/backend/entry-node.ts +++ b/framework/backend/entry-node.ts @@ -6,7 +6,7 @@ const app = require(globalThis.CLOVER_SERVER_ENTRY ?? process.argv[2]); const protocol = "http"; const server = serve({ - fetch: app.fetch, + fetch: app.default.fetch, port: Number(process.env.PORT ?? 3000), }, ({ address, port }) => { if (address === "::") address = "::1"; diff --git a/readme.md b/readme.md index d3fc06498ac7ddaf948c2f2fedc65f5b05840f9e..4edadb260d2c1199c237c42323f4397f6e2fdb30 100644 --- a/readme.md +++ b/readme.md @@ -104,6 +104,9 @@ Deployment of the source of truth can be done with Docker Compose: - /mnt/storage1/clover/Documents/Config/paperclover:/data - /mnt/storage1/clover/Published:/published +Due to caching, one may need to manually purge images via +`docker image rm ix-paperclover-backend -f` when an update is desired + TODO: deployment instructions for a web node ## Contributions diff --git a/src/source-of-truth.dockerfile b/src/source-of-truth.dockerfile index 2c48f88d313679ef8489fe6f00ef6c51f03dcf4f..8c21c1e781dbb27db05520663178121297d24da6 100644 --- a/src/source-of-truth.dockerfile +++ b/src/source-of-truth.dockerfile @@ -1,6 +1,6 @@ -from node:24-alpine as builder +from node:24 as builder -run apk add --no-cache git +run apt install -y git workdir /paperclover.net copy package*.json ./ @@ -17,12 +17,12 @@ run npx esbuild --bundle \ --outdir=/app \ && cp framework/lib/mime.txt /app/ -from node:24-alpine as runtime +from node:24 as runtime workdir /app copy --from=builder /app/ ./ -env PORT=3001 +env PORT=43200 # must be configured env CLOVER_DB=/dev/null env CLOVER_FILE_RAW=/dev/null diff --git a/src/source-of-truth.ts b/src/source-of-truth.ts index 31bc68887bb645ee2b03606490a7f128614a63cf..8d3d59b9ba4db6ccfae7d679c4e012209634bf55 100644 --- a/src/source-of-truth.ts +++ b/src/source-of-truth.ts @@ -31,7 +31,7 @@ const nasRoot = process.platform === "win32" const rawFileRoot = process.env.CLOVER_FILE_RAW ?? path.join(nasRoot, "Published"); const derivedFileRoot = process.env.CLOVER_FILE_DERIVED ?? - path.join(nasRoot, "Documents/Config/clover_file/derived"); + path.join(nasRoot, "Documents/Config/paperclover/derived"); if (!fs.existsSync(rawFileRoot)) throw new Error(`${rawFileRoot} does not exist`); if (!fs.existsSync(derivedFileRoot)) throw new Error(`${derivedFileRoot} does not exist`);