sched: custom single-binary (embedded engine+admin api+morda+mcp+maria) — artifacts in .admin; compose on sched-custom
This commit is contained in:
29
host-stacks/vds-kzntsv/sched-custom/Dockerfile.custom
Normal file
29
host-stacks/vds-kzntsv/sched-custom/Dockerfile.custom
Normal file
@@ -0,0 +1,29 @@
|
||||
# sched custom single-binary — embedded engine + admin API + UI morda + MCP + storage (MariaDB).
|
||||
# Built on published @schedjs/* npm packages (artifacts that passed the gates).
|
||||
# Runs apps/daemon/src/custom-entry.mjs — one HTTP server :8080 routing /api, /mcp, / (morda).
|
||||
#
|
||||
# Build:
|
||||
# docker build -f apps/daemon/Dockerfile.custom -t registry.kzntsv.site/sched-custom:0.12.1-mysql apps/daemon
|
||||
# Run:
|
||||
# docker run -e MYSQL_URL=mysql://sched:pw@mariadb:3306/sched?ssl={"rejectUnauthorized":false} \
|
||||
# -e SCHED_ADMIN_KEY=... -e SCHED_TASKS=/app/config/tasks.json \
|
||||
# registry.kzntsv.site/sched-custom:0.12.1-mysql
|
||||
|
||||
FROM node:24-alpine
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
|
||||
RUN echo '{"name":"schedd","private":true,"packageManager":"yarn@4.18.0"}' > package.json \
|
||||
&& corepack enable \
|
||||
&& printf 'nodeLinker: node-modules\nnpmMinimalAgeGate: 0\n' > .yarnrc.yml \
|
||||
&& CI=1 yarn add @schedjs/daemon@0.12.1 @schedjs/storage-mysql@0.4.0 @schedjs/admin-api@0.3.0 @schedjs/mcp@0.4.1 @schedjs/ui@0.3.0 mysql2@3 \
|
||||
&& rm -f .yarnrc.yml \
|
||||
&& yarn cache clean
|
||||
|
||||
ENV PATH="/app/node_modules/.bin:${PATH}"
|
||||
COPY src/custom-entry.mjs /app/custom-entry.mjs
|
||||
# Default tasks.json baked into the image (overridden on prod by a bind mount / SCHED_TASKS).
|
||||
RUN echo '{"tasks":[]}' > /app/tasks.json
|
||||
EXPOSE 8080
|
||||
VOLUME ["/data"]
|
||||
ENTRYPOINT ["node", "/app/custom-entry.mjs"]
|
||||
Reference in New Issue
Block a user