authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-07-09 23:45:21-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-10-14 02:40:46-07:00
log881042bdfc7394daeb49e3f63b23f386b5e541ce
treed23b378cc77d7bbb8c2c2516a0d7fd8f376bc4e6
parente2c13208274007fa2abc59668649e28c3c57c36b
signature Commit is signed but in an unrecognized format.

sot: fix deployment


4 files changed, 9 insertions(+), 6 deletions(-)

framework/backend/entry-node.ts+1-1
...@@ -6,7 +6,7 @@ const app = require(globalThis.CLOVER_SERVER_ENTRY ?? process.argv[2]);...@@ -6,7 +6,7 @@ const app = require(globalThis.CLOVER_SERVER_ENTRY ?? process.argv[2]);
6const protocol = "http";6const protocol = "http";
77
8const server = serve({8const server = serve({
9 fetch: app.fetch,9 fetch: app.default.fetch,
10 port: Number(process.env.PORT ?? 3000),10 port: Number(process.env.PORT ?? 3000),
11}, ({ address, port }) => {11}, ({ address, port }) => {
12 if (address === "::") address = "::1";12 if (address === "::") address = "::1";
readme.md+3
...@@ -104,6 +104,9 @@ Deployment of the source of truth can be done with Docker Compose:...@@ -104,6 +104,9 @@ Deployment of the source of truth can be done with Docker Compose:
104 - /mnt/storage1/clover/Documents/Config/paperclover:/data104 - /mnt/storage1/clover/Documents/Config/paperclover:/data
105 - /mnt/storage1/clover/Published:/published105 - /mnt/storage1/clover/Published:/published
106106
107Due to caching, one may need to manually purge images via
108`docker image rm ix-paperclover-backend -f` when an update is desired
109
107TODO: deployment instructions for a web node110TODO: deployment instructions for a web node
108111
109## Contributions112## Contributions
src/source-of-truth.dockerfile+4-4
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1from node:24-alpine as builder1from node:24 as builder
22
3run apk add --no-cache git3run apt install -y git
44
5workdir /paperclover.net5workdir /paperclover.net
6copy package*.json ./6copy package*.json ./
...@@ -17,12 +17,12 @@ run npx esbuild --bundle \...@@ -17,12 +17,12 @@ run npx esbuild --bundle \
17 --outdir=/app \17 --outdir=/app \
18 && cp framework/lib/mime.txt /app/18 && cp framework/lib/mime.txt /app/
1919
20from node:24-alpine as runtime20from node:24 as runtime
2121
22workdir /app22workdir /app
23copy --from=builder /app/ ./23copy --from=builder /app/ ./
2424
25env PORT=300125env PORT=43200
26# must be configured26# must be configured
27env CLOVER_DB=/dev/null27env CLOVER_DB=/dev/null
28env CLOVER_FILE_RAW=/dev/null28env CLOVER_FILE_RAW=/dev/null
src/source-of-truth.ts+1-1
...@@ -31,7 +31,7 @@ const nasRoot = process.platform === "win32"...@@ -31,7 +31,7 @@ const nasRoot = process.platform === "win32"
31const rawFileRoot = process.env.CLOVER_FILE_RAW ??31const rawFileRoot = process.env.CLOVER_FILE_RAW ??
32 path.join(nasRoot, "Published");32 path.join(nasRoot, "Published");
33const derivedFileRoot = process.env.CLOVER_FILE_DERIVED ??33const derivedFileRoot = process.env.CLOVER_FILE_DERIVED ??
34 path.join(nasRoot, "Documents/Config/clover_file/derived");34 path.join(nasRoot, "Documents/Config/paperclover/derived");
3535
36if (!fs.existsSync(rawFileRoot)) throw new Error(`${rawFileRoot} does not exist`);36if (!fs.existsSync(rawFileRoot)) throw new Error(`${rawFileRoot} does not exist`);
37if (!fs.existsSync(derivedFileRoot)) throw new Error(`${derivedFileRoot} does not exist`);37if (!fs.existsSync(derivedFileRoot)) throw new Error(`${derivedFileRoot} does not exist`);