2024-09-05 21:35:14 +03:00
|
|
|
type Label = {
|
2024-09-08 23:15:54 +03:00
|
|
|
[label: string]: string
|
2024-09-05 21:35:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type WeightDevice = Array<{
|
2024-09-08 23:15:54 +03:00
|
|
|
path: string
|
|
|
|
weight: number
|
2024-09-05 21:35:14 +03:00
|
|
|
}>
|
|
|
|
|
|
|
|
type DeviceBLK = Array<{
|
2024-09-08 23:15:54 +03:00
|
|
|
path: string
|
|
|
|
rate: number | string
|
2024-09-05 21:35:14 +03:00
|
|
|
}>
|
|
|
|
|
|
|
|
type BuildServices = {
|
2024-09-08 23:15:54 +03:00
|
|
|
context: string
|
|
|
|
dockefile: string
|
|
|
|
dockerfile_inline: string
|
|
|
|
args: Label
|
|
|
|
ssh: Array<string>
|
|
|
|
cache_from: Array<string>
|
|
|
|
cache_to: Array<string>
|
|
|
|
additional_contexts: Array<Label>
|
|
|
|
extra_hosts: Label
|
|
|
|
labels: Label
|
|
|
|
privileged: boolean
|
|
|
|
no_cache: boolean
|
|
|
|
network: "none" | "host" | string
|
|
|
|
shm_size: number | string
|
|
|
|
target: string
|
|
|
|
secrets: Array<string>
|
|
|
|
tags: Array<string>
|
|
|
|
platforms: Array<string>
|
|
|
|
ulimits: {
|
|
|
|
nproc: number
|
|
|
|
nofile: {
|
|
|
|
soft: number
|
|
|
|
hard: number
|
|
|
|
}
|
|
|
|
}
|
2024-09-05 21:35:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
enum Runtimes {
|
2024-09-08 23:15:54 +03:00
|
|
|
runc,
|
|
|
|
crun,
|
|
|
|
youki,
|
|
|
|
inclavare,
|
|
|
|
gvisor,
|
|
|
|
wasmtime,
|
|
|
|
katacontainers,
|
2024-09-05 21:35:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export type Services = {
|
2024-09-08 23:15:54 +03:00
|
|
|
[name: string]: {
|
|
|
|
annotations?: Label
|
|
|
|
image: string
|
|
|
|
ports?: Array<string>
|
2024-09-05 21:35:14 +03:00
|
|
|
|
2024-09-08 23:15:54 +03:00
|
|
|
attach?: boolean
|
|
|
|
build?: BuildServices
|
|
|
|
blkio_config?: {
|
|
|
|
weight: number
|
|
|
|
weight_device: Array<{
|
|
|
|
path: string
|
|
|
|
weight: number
|
|
|
|
}>
|
|
|
|
device_read_bps: DeviceBLK
|
|
|
|
device_read_iops: DeviceBLK
|
|
|
|
device_write_bps: DeviceBLK
|
|
|
|
device_write_iops: DeviceBLK
|
|
|
|
}
|
|
|
|
cpu_count?: number
|
|
|
|
cpu_persent?: number | string
|
|
|
|
cpu_quota?: number | string
|
|
|
|
cpu_rt_runtime?: number | string
|
|
|
|
cpu_rt_period?: number | string
|
|
|
|
cpus?: string
|
|
|
|
cpuset?: string
|
|
|
|
cap_add?: Array<string>
|
|
|
|
cap_drop?: Array<string>
|
|
|
|
cgroup?: "host" | "private"
|
|
|
|
cpu_rt_period?: string
|
|
|
|
command?: Array<string> | string
|
|
|
|
configs?:
|
|
|
|
| Array<string>
|
|
|
|
| Array<{
|
|
|
|
source: string
|
|
|
|
target: string
|
|
|
|
uid: string
|
|
|
|
gid: string
|
|
|
|
mode: number
|
|
|
|
}>
|
|
|
|
container_name?: string
|
|
|
|
credential_spec?: {
|
|
|
|
file?: string
|
|
|
|
registry?: string
|
|
|
|
}
|
|
|
|
depends_on?: Array<string>
|
|
|
|
dns?: string | Array<string>
|
|
|
|
dns_opt?: Array<string>
|
|
|
|
dns_search?: string | Array<string>
|
|
|
|
entrypoint?: string | Array<string>
|
|
|
|
tmpfs?: string | Array<string>
|
|
|
|
env_file?:
|
|
|
|
| Array<string>
|
|
|
|
| Array<{
|
|
|
|
path: string
|
|
|
|
required: boolean
|
|
|
|
}>
|
|
|
|
environment?: Array<string>
|
|
|
|
expose?: Array<string>
|
|
|
|
extends?: {
|
|
|
|
file: string
|
|
|
|
service: string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
external_links?: Array<string>
|
|
|
|
volumes_from?: Array<string>
|
|
|
|
tty?: boolean
|
|
|
|
sysctl?: Label
|
|
|
|
runtime: Runtimes
|
|
|
|
restart:
|
|
|
|
| "no"
|
|
|
|
| "always"
|
|
|
|
| "unless-stopped"
|
|
|
|
| "on-failure"
|
|
|
|
| { "on-failure": number }
|
|
|
|
workdir?: string
|
|
|
|
extra_hosts?: string
|
|
|
|
stdin_open?: boolean
|
|
|
|
init?: boolean
|
|
|
|
profiles?: Array<string>
|
|
|
|
network_mode?: "none" | "host"
|
|
|
|
logging?: {
|
|
|
|
driver: string
|
|
|
|
options?: Label
|
|
|
|
}
|
|
|
|
links?: Array<string>
|
|
|
|
labels?: Array<Label>
|
|
|
|
group_add?: Array<string>
|
|
|
|
pids_limit?: number
|
|
|
|
pull_policy?: "always" | "never" | "missing" | "build"
|
|
|
|
hostname?: string
|
|
|
|
devices?: Array<string>
|
|
|
|
volumes?: Array<string>
|
|
|
|
uts?: "host" | string
|
|
|
|
mem_limit?: number | string
|
|
|
|
healthcheck?: {
|
|
|
|
test: Array<string>
|
|
|
|
timeout?: string
|
|
|
|
interval?: string
|
|
|
|
start_period?: string
|
|
|
|
start_interval?: string
|
|
|
|
retries: number
|
|
|
|
disable?: true
|
|
|
|
}
|
2024-09-05 21:35:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type Networks = {
|
2024-09-08 23:15:54 +03:00
|
|
|
[name: string]: {
|
|
|
|
driver?: string
|
|
|
|
driver_opts?: Label
|
|
|
|
attachable?: boolean
|
|
|
|
enable_ipv6?: boolean
|
|
|
|
external?: boolean
|
|
|
|
name?: string
|
|
|
|
ipam?: {
|
|
|
|
driver?: string
|
|
|
|
config?: Array<{
|
|
|
|
subnet: string
|
|
|
|
ip_range: string
|
|
|
|
gateway: string
|
|
|
|
aux_addresses: Array<Label>
|
|
|
|
}>
|
|
|
|
}
|
|
|
|
labels?: Array<Label>
|
|
|
|
options?: Array<Label>
|
|
|
|
}
|
2024-09-05 21:35:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type Volumes = {
|
2024-09-08 23:15:54 +03:00
|
|
|
[name: string]: {
|
|
|
|
external?: boolean
|
|
|
|
labels?: Array<Label>
|
|
|
|
driver?: string
|
|
|
|
driver_opts?: Label
|
|
|
|
name?: string
|
|
|
|
}
|
2024-09-05 21:35:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type Configs = {
|
2024-09-08 23:15:54 +03:00
|
|
|
[name: string]: {
|
|
|
|
external?: boolean
|
|
|
|
name?: string
|
|
|
|
file?: string
|
|
|
|
environment?: string
|
|
|
|
content?: string
|
|
|
|
}
|
2024-09-05 21:35:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type Secrets = {
|
2024-09-08 23:15:54 +03:00
|
|
|
[name: string]:
|
|
|
|
| {
|
|
|
|
file?: string
|
|
|
|
}
|
|
|
|
| {
|
|
|
|
token: {
|
|
|
|
environment: string
|
|
|
|
}
|
|
|
|
}
|
2024-09-05 21:35:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export type Compose = {
|
2024-09-08 23:15:54 +03:00
|
|
|
version?: "3"
|
|
|
|
services: Services
|
|
|
|
networks?: Networks
|
|
|
|
volumes?: Volumes
|
|
|
|
configs?: Configs
|
|
|
|
secrets?: Secrets
|
2024-09-05 21:35:14 +03:00
|
|
|
}
|