Add StartOS 0.4 package scaffold (manifest, main, interfaces, 2 actions)
- package/Makefile + s9pk.mk + package.json + tsconfig.json - startos/manifest: dockerBuild source pointing at ../image/Dockerfile - startos/main: reads /data/config.yaml reactively, passes env vars to container - startos/interfaces: binds port 9999 as HTTP UI - startos/actions: showPublicKey (read /data/ssh/id_ed25519.pub), configureSparks - TS + JS bundle compile clean (tsc --noEmit, ncc build)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { FileHelper } from '@start9labs/start-sdk'
|
||||
import { z } from 'zod'
|
||||
import { sdk } from '../sdk'
|
||||
|
||||
export const sparkConfigSchema = z.object({
|
||||
spark1_host: z.string().catch(''),
|
||||
spark1_user: z.string().catch('<spark-user>'),
|
||||
spark2_host: z.string().catch(''),
|
||||
spark2_user: z.string().catch('<spark-user>'),
|
||||
})
|
||||
|
||||
export type SparkConfig = z.infer<typeof sparkConfigSchema>
|
||||
|
||||
export const sparkConfigYaml = FileHelper.yaml(
|
||||
{ base: sdk.volumes.main, subpath: 'config.yaml' },
|
||||
sparkConfigSchema,
|
||||
)
|
||||
Reference in New Issue
Block a user