Files
OpenNest/compose.server.yaml
T
ajandClaude Opus 5.5 81ec6a8125 feat(server): list, reopen and keep server nest jobs once
A server Auto Nest result could only be reviewed in the session that sent it,
and nothing stopped two desktops from keeping the same result. Phase 3 adds
My Server Jobs, so results that finished while OpenNest was closed are easy
to find, and records each review on the server.

- Server: GET /api/nest-jobs lists jobs newest first with state, engine,
  submitter, times, queue position, review and the worker's summary (parts,
  sheets, utilization, unplaced). It filters to active, finished or
  unreviewed jobs and to a submitter (a bare user name matches that user on
  any workstation). An ETag turns unchanged polls into 304s. Schema v17 adds
  nestId, review and summary columns, only where missing.
- Keep once: POST .../keep and .../discard take If-Match on the job revision
  and change an unreviewed result only once. A second desktop gets 409 with
  who kept it. DELETE removes finished jobs. A succeeded job keeps its
  package until it is reviewed, so a later session can rebuild the job.
- Retention: OPENNEST_JOB_RETENTION_DAYS (default 7) deletes finished jobs
  with their results. It runs on claims and list reads. A malformed value
  fails startup instead of deleting results early.
- Worker: reports the result's summary with the transcript. A job cancelled
  while its result arrived keeps no summary (found in the Docker smoke run).
- Desktop: Nest > My Server Jobs polls the list every 3 s; polling rather
  than per-job SSE because the list must show other desktops' jobs and
  removals. Open rebuilds the job from job.json against the open nest's own
  drawings. New per-drawing geometry fingerprints make the freshness check
  work across sessions. Cancel Job and Remove act on the selected job. A
  status-bar item counts this user's results waiting for review; there is
  no popup. Auto Nest's review now records Keep on the server before it
  commits, and records Discard too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:18:11 -05:00

49 lines
1.9 KiB
YAML

# OpenNest.Server deployment example: one instance, one local data volume, LAN-only.
# Usage: docker compose --env-file <local-env> -f compose.server.yaml up -d
# Start from OpenNest.Server/server.env.example. See docs/nest-storage.md before deploying.
name: opennest-server
services:
opennest-server:
image: ${OPENNEST_SERVER_IMAGE:?Set a tested version or digest}
restart: unless-stopped
ports:
- "${OPENNEST_BIND_ADDRESS:?Set 127.0.0.1 for testing or a trusted LAN address}:${OPENNEST_HOST_PORT:-8090}:8090"
environment:
ASPNETCORE_URLS: http://+:8090
OPENNEST_DB: /app/data/nests.db
# "off" stops mirroring the desktop update feed from GitHub (clients then check GitHub themselves).
OPENNEST_UPDATES: ${OPENNEST_UPDATES:-on}
OPENNEST_JOB_RETENTION_DAYS: ${OPENNEST_JOB_RETENTION_DAYS:-7}
volumes:
- opennest-data:/app/data
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
# Server nesting (docs/server-nesting.md): the same image solving queued Auto Nest jobs one
# at a time. It talks to the server over HTTP and never opens the database, and its own CPU
# and memory limits keep a large nest from slowing nest open and save. A job has no time
# limit, so fewer CPUs only make it slower, never a worse nest.
opennest-worker:
image: ${OPENNEST_SERVER_IMAGE:?Set a tested version or digest}
restart: unless-stopped
depends_on:
- opennest-server
environment:
OPENNEST_ROLE: worker
OPENNEST_SERVER_URL: http://opennest-server:8090/
cpus: ${OPENNEST_WORKER_CPUS:-2}
mem_limit: ${OPENNEST_WORKER_MEMORY:-4g}
# Time to give a running job back to the queue on stop.
stop_grace_period: 30s
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
volumes:
opennest-data:
# A restore switches to a separately verified volume instead of overwriting this one.
name: ${OPENNEST_DATA_VOLUME:-opennest-data}