sot: fix deployment
This commit is contained in:
parent
c5db92203c
commit
8a3a36f0c2
4 changed files with 9 additions and 6 deletions
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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`);
|
||||
|
|
Loading…
Reference in a new issue