mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
* feat: Add disk usage * Fixed: let the set config work with nesting. * chore: Changes * chore: Add default route * fix: Tor only config * chore
48 lines
907 B
TypeScript
48 lines
907 B
TypeScript
import {
|
|
object,
|
|
literal,
|
|
string,
|
|
boolean,
|
|
array,
|
|
dictionary,
|
|
literals,
|
|
number,
|
|
Parser,
|
|
some,
|
|
} from "ts-matches"
|
|
import { matchDuration } from "./Duration"
|
|
|
|
const VolumeId = string
|
|
const Path = string
|
|
|
|
export type VolumeId = string
|
|
export type Path = string
|
|
export const matchDockerProcedure = object(
|
|
{
|
|
type: literal("docker"),
|
|
image: string,
|
|
system: boolean,
|
|
entrypoint: string,
|
|
args: array(string),
|
|
mounts: dictionary([VolumeId, Path]),
|
|
"io-format": literals(
|
|
"json",
|
|
"json-pretty",
|
|
"yaml",
|
|
"cbor",
|
|
"toml",
|
|
"toml-pretty",
|
|
),
|
|
"sigterm-timeout": some(number, matchDuration),
|
|
inject: boolean,
|
|
},
|
|
["io-format", "sigterm-timeout", "system", "args", "inject", "mounts"],
|
|
{
|
|
"sigterm-timeout": 30,
|
|
inject: false,
|
|
args: [],
|
|
},
|
|
)
|
|
|
|
export type DockerProcedure = typeof matchDockerProcedure._TYPE
|