Scaffold: fork of Chambers architecture, renamed to Boardroom Map
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import { sdk } from './sdk'
|
||||
import { WEB_UI_PORT } from './interfaces'
|
||||
|
||||
export const main = sdk.setupMain(async ({ effects }) => {
|
||||
// Mount the persistent volume at /data: config.json, ssh key, optional HF
|
||||
// token, the dropped-document inbox, job run state, and saved reports all live
|
||||
// here.
|
||||
const mounts = sdk.Mounts.of().mountVolume({
|
||||
volumeId: 'main',
|
||||
mountpoint: '/data',
|
||||
subpath: null,
|
||||
readonly: false,
|
||||
})
|
||||
|
||||
const sub = await sdk.SubContainer.of(
|
||||
effects,
|
||||
{ imageId: 'main' },
|
||||
mounts,
|
||||
'boardroom-webui',
|
||||
)
|
||||
|
||||
// The web UI runs the FastAPI app AND, in a background thread, the Boardroom Map job
|
||||
// runner (which extracts dropped documents, serves the chosen models on the
|
||||
// Sparks in waves, runs the reviewer panel, and synthesizes a report).
|
||||
return sdk.Daemons.of(effects).addDaemon('webui', {
|
||||
subcontainer: sub,
|
||||
exec: {
|
||||
command: [
|
||||
'uvicorn',
|
||||
'app:app',
|
||||
'--host',
|
||||
'0.0.0.0',
|
||||
'--port',
|
||||
String(WEB_UI_PORT),
|
||||
],
|
||||
cwd: '/app',
|
||||
env: { BM_DATA_DIR: '/data' },
|
||||
},
|
||||
ready: {
|
||||
display: 'Web Interface',
|
||||
fn: () =>
|
||||
sdk.healthCheck.checkPortListening(effects, WEB_UI_PORT, {
|
||||
successMessage: 'The control panel is ready',
|
||||
errorMessage: 'The control panel is not yet listening',
|
||||
}),
|
||||
},
|
||||
requires: [],
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user