| author | |
| committer | |
| log | 881042bdfc7394daeb49e3f63b23f386b5e541ce |
| tree | d23b378cc77d7bbb8c2c2516a0d7fd8f376bc4e6 |
| parent | e2c13208274007fa2abc59668649e28c3c57c36b |
| signature | Commit is signed but in an unrecognized format. |
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]); |
| 6 | const protocol = "http"; | 6 | const protocol = "http"; |
| 7 | 7 | ||
| 8 | const server = serve({ | 8 | const 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:/data | 104 | - /mnt/storage1/clover/Documents/Config/paperclover:/data |
| 105 | - /mnt/storage1/clover/Published:/published | 105 | - /mnt/storage1/clover/Published:/published |
| 106 | 106 | ||
| 107 | Due to caching, one may need to manually purge images via | ||
| 108 | `docker image rm ix-paperclover-backend -f` when an update is desired | ||
| 109 | |||
| 107 | TODO: deployment instructions for a web node | 110 | TODO: deployment instructions for a web node |
| 108 | 111 | ||
| 109 | ## Contributions | 112 | ## Contributions |
src/source-of-truth.dockerfile+4-4| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | from node:24-alpine as builder | 1 | from node:24 as builder |
| 2 | 2 | ||
| 3 | run apk add --no-cache git | 3 | run apt install -y git |
| 4 | 4 | ||
| 5 | workdir /paperclover.net | 5 | workdir /paperclover.net |
| 6 | copy package*.json ./ | 6 | copy 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/ |
| 19 | 19 | ||
| 20 | from node:24-alpine as runtime | 20 | from node:24 as runtime |
| 21 | 21 | ||
| 22 | workdir /app | 22 | workdir /app |
| 23 | copy --from=builder /app/ ./ | 23 | copy --from=builder /app/ ./ |
| 24 | 24 | ||
| 25 | env PORT=3001 | 25 | env PORT=43200 |
| 26 | # must be configured | 26 | # must be configured |
| 27 | env CLOVER_DB=/dev/null | 27 | env CLOVER_DB=/dev/null |
| 28 | env CLOVER_FILE_RAW=/dev/null | 28 | env 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" |
| 31 | const rawFileRoot = process.env.CLOVER_FILE_RAW ?? | 31 | const rawFileRoot = process.env.CLOVER_FILE_RAW ?? |
| 32 | path.join(nasRoot, "Published"); | 32 | path.join(nasRoot, "Published"); |
| 33 | const derivedFileRoot = process.env.CLOVER_FILE_DERIVED ?? | 33 | const derivedFileRoot = process.env.CLOVER_FILE_DERIVED ?? |
| 34 | path.join(nasRoot, "Documents/Config/clover_file/derived"); | 34 | path.join(nasRoot, "Documents/Config/paperclover/derived"); |
| 35 | 35 | ||
| 36 | if (!fs.existsSync(rawFileRoot)) throw new Error(`${rawFileRoot} does not exist`); | 36 | if (!fs.existsSync(rawFileRoot)) throw new Error(`${rawFileRoot} does not exist`); |
| 37 | if (!fs.existsSync(derivedFileRoot)) throw new Error(`${derivedFileRoot} does not exist`); | 37 | if (!fs.existsSync(derivedFileRoot)) throw new Error(`${derivedFileRoot} does not exist`); |