@intentius/chant-lexicon-docker 0.124.22 → 0.124.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/codegen/generate.d.ts.map +1 -1
  2. package/dist/generated/index.d.ts +582 -6
  3. package/dist/generated/index.d.ts.map +1 -1
  4. package/dist/integrity.json +7 -7
  5. package/dist/lint/post-synth/cache-busting-copy.d.ts.map +1 -1
  6. package/dist/manifest.json +1 -1
  7. package/dist/meta.json +438 -86
  8. package/dist/okf/types/DockerConfig.md +7 -5
  9. package/dist/okf/types/DockerSecret.md +8 -4
  10. package/dist/okf/types/Network.md +10 -6
  11. package/dist/okf/types/Service.md +93 -15
  12. package/dist/okf/types/Volume.md +5 -5
  13. package/dist/rules/cache-busting-copy.ts +2 -1
  14. package/dist/skills/chant-docker-patterns.md +2 -2
  15. package/dist/skills/chant-docker.md +1 -0
  16. package/dist/spec/parse-compose.d.ts +29 -2
  17. package/dist/spec/parse-compose.d.ts.map +1 -1
  18. package/dist/types/index.d.ts +263 -41
  19. package/package.json +3 -3
  20. package/src/codegen/__snapshots__/okf.test.ts.snap +123 -35
  21. package/src/codegen/generate.ts +53 -14
  22. package/src/codegen/okf.test.ts +1 -1
  23. package/src/generated/index.d.ts +263 -41
  24. package/src/generated/index.ts +279 -6
  25. package/src/generated/lexicon-docker.json +438 -86
  26. package/src/import/generator.test.ts +4 -4
  27. package/src/import/generator.ts +4 -4
  28. package/src/import/roundtrip.test.ts +62 -2
  29. package/src/import/testdata/configs-secrets.yaml +15 -0
  30. package/src/lint/post-synth/cache-busting-copy.ts +2 -1
  31. package/src/skills/chant-docker-patterns.md +2 -2
  32. package/src/skills/chant-docker.md +1 -0
  33. package/src/spec/parse-compose.ts +167 -95
  34. package/src/typecheck.e2e.test.ts +107 -0
  35. package/src/typed-props.test.ts +60 -0
@@ -1,60 +1,282 @@
1
1
  // Code generated by chant generate. DO NOT EDIT.
2
2
  import type { Declarable } from "@intentius/chant/declarable";
3
3
 
4
+ /** An `env()` interpolation, as returned by the lexicon's `env`. */
5
+ interface EnvIntrinsic { toJSON(): string; toString(): string; }
6
+
7
+ /**
8
+ * A Compose string value: a string, an `env()` interpolation, or an entity
9
+ * (service, network, volume, config, secret or Dockerfile), which is written as its name.
10
+ */
11
+ export type ComposeString = string | EnvIntrinsic | Declarable;
12
+
13
+ /** A containerized service definition in Docker Compose */
4
14
  export interface ServiceProps {
5
- image?: string;
6
- build?: object;
7
- command?: string | string[];
8
- entrypoint?: string | string[];
9
- environment?: Record<string, string>;
10
- ports?: string[];
11
- volumes?: string[];
12
- networks?: string[];
13
- depends_on?: string[] | Record<string, { condition: "service_started" | "service_healthy" | "service_completed_successfully"; restart?: boolean; required?: boolean }>;
14
- restart?: string;
15
- labels?: Record<string, string>;
16
- healthcheck?: object;
17
- deploy?: object;
18
- secrets?: string[];
19
- configs?: Array<string | { source: string | Declarable; target?: string; uid?: string; gid?: string; mode?: number }>;
15
+ develop?: { watch?: Array<{ ignore?: ComposeString | Array<ComposeString>; include?: ComposeString | Array<ComposeString>; path: ComposeString; action: "rebuild" | "sync" | "restart" | "sync+restart" | "sync+exec"; target?: ComposeString; exec?: { command: null | ComposeString | Array<ComposeString>; user?: ComposeString; privileged?: boolean | ComposeString; working_dir?: ComposeString; environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; [key: `x-${string}`]: unknown }; initial_sync?: boolean; [key: `x-${string}`]: unknown }>; [key: `x-${string}`]: unknown } | null;
16
+ deploy?: { mode?: ComposeString; endpoint_mode?: ComposeString; replicas?: number | ComposeString; labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; rollback_config?: { parallelism?: number | ComposeString; delay?: ComposeString; failure_action?: ComposeString; monitor?: ComposeString; max_failure_ratio?: number | ComposeString; order?: "start-first" | "stop-first"; [key: `x-${string}`]: unknown }; update_config?: { parallelism?: number | ComposeString; delay?: ComposeString; failure_action?: ComposeString; monitor?: ComposeString; max_failure_ratio?: number | ComposeString; order?: "start-first" | "stop-first"; [key: `x-${string}`]: unknown }; resources?: { limits?: { cpus?: number | ComposeString; memory?: ComposeString; pids?: number | ComposeString; [key: `x-${string}`]: unknown }; reservations?: { cpus?: number | ComposeString; memory?: ComposeString; generic_resources?: Array<{ discrete_resource_spec?: { kind?: ComposeString; value?: number | ComposeString; [key: `x-${string}`]: unknown }; [key: `x-${string}`]: unknown }>; devices?: Array<{ capabilities: Array<ComposeString>; count?: ComposeString | number; device_ids?: Array<ComposeString>; driver?: ComposeString; options?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; [key: `x-${string}`]: unknown }>; [key: `x-${string}`]: unknown }; [key: `x-${string}`]: unknown }; restart_policy?: { condition?: ComposeString; delay?: ComposeString; max_attempts?: number | ComposeString; window?: ComposeString; [key: `x-${string}`]: unknown }; placement?: { constraints?: Array<ComposeString>; preferences?: Array<{ spread?: ComposeString; [key: `x-${string}`]: unknown }>; max_replicas_per_node?: number | ComposeString; [key: `x-${string}`]: unknown }; [key: `x-${string}`]: unknown } | null;
17
+ annotations?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
18
+ attach?: boolean | ComposeString;
19
+ /** Configuration options for building the service's image. */
20
+ build?: ComposeString | { context?: ComposeString; dockerfile?: ComposeString; dockerfile_inline?: ComposeString; entitlements?: Array<ComposeString>; args?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; ssh?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; cache_from?: Array<ComposeString>; cache_to?: Array<ComposeString>; no_cache?: boolean | ComposeString; no_cache_filter?: ComposeString | Array<ComposeString>; additional_contexts?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; network?: ComposeString; provenance?: ComposeString | boolean; sbom?: ComposeString | boolean; pull?: boolean | ComposeString; target?: ComposeString; shm_size?: number | ComposeString; extra_hosts?: Record<string, ComposeString | Array<ComposeString>> | Array<ComposeString>; isolation?: ComposeString; privileged?: boolean | ComposeString; secrets?: Array<ComposeString | { source?: ComposeString; target?: ComposeString; uid?: ComposeString; gid?: ComposeString; mode?: number | ComposeString; [key: `x-${string}`]: unknown }>; tags?: Array<ComposeString>; ulimits?: Record<string, number | ComposeString | { hard: number | ComposeString; soft: number | ComposeString; [key: `x-${string}`]: unknown }>; platforms?: Array<ComposeString>; [key: `x-${string}`]: unknown };
21
+ /** Block IO configuration for the service. */
22
+ blkio_config?: { device_read_bps?: Array<{ path?: ComposeString; rate?: number | ComposeString }>; device_read_iops?: Array<{ path?: ComposeString; rate?: number | ComposeString }>; device_write_bps?: Array<{ path?: ComposeString; rate?: number | ComposeString }>; device_write_iops?: Array<{ path?: ComposeString; rate?: number | ComposeString }>; weight?: number | ComposeString; weight_device?: Array<{ path?: ComposeString; weight?: number | ComposeString }> };
23
+ /** Add Linux capabilities. For example, 'CAP_SYS_ADMIN', 'SYS_ADMIN', or 'NET_ADMIN'. */
24
+ cap_add?: Array<ComposeString>;
25
+ /** Drop Linux capabilities. For example, 'CAP_SYS_ADMIN', 'SYS_ADMIN', or 'NET_ADMIN'. */
26
+ cap_drop?: Array<ComposeString>;
27
+ /** Specify the cgroup namespace to join. Use 'host' to use the host's cgroup namespace, or 'private' to use a private cgroup namespace. */
28
+ cgroup?: "host" | "private";
29
+ /** Specify an optional parent cgroup for the container. */
30
+ cgroup_parent?: ComposeString;
31
+ /** Override the default command declared by the container image, for example 'CMD' in Dockerfile. */
32
+ command?: null | ComposeString | Array<ComposeString>;
33
+ /** Grant access to Configs on a per-service basis. */
34
+ configs?: Array<ComposeString | { source?: ComposeString; target?: ComposeString; uid?: ComposeString; gid?: ComposeString; mode?: number | ComposeString; [key: `x-${string}`]: unknown }>;
35
+ /** Specify a custom container name, rather than a generated default name. */
36
+ container_name?: ComposeString;
37
+ /** Number of usable CPUs. */
38
+ cpu_count?: ComposeString | number;
39
+ /** Percentage of CPU resources to use. */
40
+ cpu_percent?: ComposeString | number;
41
+ /** CPU shares (relative weight) for the container. */
42
+ cpu_shares?: number | ComposeString;
43
+ /** Limit the CPU CFS (Completely Fair Scheduler) quota. */
44
+ cpu_quota?: number | ComposeString;
45
+ /** Limit the CPU CFS (Completely Fair Scheduler) period. */
46
+ cpu_period?: number | ComposeString;
47
+ /** Limit the CPU real-time period in microseconds or a duration. */
48
+ cpu_rt_period?: number | ComposeString;
49
+ /** Limit the CPU real-time runtime in microseconds or a duration. */
50
+ cpu_rt_runtime?: number | ComposeString;
51
+ /** Number of CPUs to use. A floating-point value is supported to request partial CPUs. */
52
+ cpus?: number | ComposeString;
53
+ /** CPUs in which to allow execution (0-3, 0,1). */
54
+ cpuset?: ComposeString;
55
+ /** Configure the credential spec for managed service account. */
56
+ credential_spec?: { config?: ComposeString; file?: ComposeString; registry?: ComposeString; [key: `x-${string}`]: unknown };
57
+ /** Express dependency between services. Service dependencies cause services to be started in dependency order. The dependent service will wait for the dependency to be ready before starting. */
58
+ depends_on?: Array<ComposeString> | Record<string, { restart?: boolean | ComposeString; required?: boolean; condition: "service_started" | "service_healthy" | "service_completed_successfully"; [key: `x-${string}`]: unknown }>;
59
+ /** Add rules to the cgroup allowed devices list. */
60
+ device_cgroup_rules?: Array<ComposeString>;
61
+ /** List of device mappings for the container. */
62
+ devices?: Array<ComposeString | { source: ComposeString; target?: ComposeString; permissions?: ComposeString; [key: `x-${string}`]: unknown }>;
63
+ /** Custom DNS servers to set for the service container. */
64
+ dns?: ComposeString | Array<ComposeString>;
65
+ /** Custom DNS options to be passed to the container's DNS resolver. */
66
+ dns_opt?: Array<ComposeString>;
67
+ /** Custom DNS search domains to set on the service container. */
68
+ dns_search?: ComposeString | Array<ComposeString>;
69
+ /** Custom domain name to use for the service container. */
70
+ domainname?: ComposeString;
71
+ /** Override the default entrypoint declared by the container image, for example 'ENTRYPOINT' in Dockerfile. */
72
+ entrypoint?: null | ComposeString | Array<ComposeString>;
73
+ /** Add environment variables from a file or multiple files. Can be a single file path or a list of file paths. */
74
+ env_file?: ComposeString | Array<ComposeString | { path: ComposeString; format?: ComposeString; required?: boolean | ComposeString }>;
75
+ /** Add metadata to containers using files containing Docker labels. */
76
+ label_file?: ComposeString | Array<ComposeString>;
77
+ /** Add environment variables. You can use either an array or a list of KEY=VAL pairs. */
78
+ environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
79
+ /** Expose ports without publishing them to the host machine - they'll only be accessible to linked services. */
80
+ expose?: Array<ComposeString | number>;
81
+ /** Extend another service, in the current file or another file. */
82
+ extends?: ComposeString | { service: ComposeString; file?: ComposeString };
83
+ /** Specify a service which will not be manage by Compose directly, and delegate its management to an external provider. */
84
+ provider?: { type: ComposeString; options?: Record<string, ComposeString | number | boolean | Array<ComposeString | number | boolean>>; [key: `x-${string}`]: unknown };
85
+ /** Link to services started outside this Compose application. Specify services as <service_name>:<alias>. */
86
+ external_links?: Array<ComposeString>;
87
+ /** Add hostname mappings to the container network interface configuration. */
88
+ extra_hosts?: Record<string, ComposeString | Array<ComposeString>> | Array<ComposeString>;
89
+ /** Define GPU devices to use. Can be set to 'all' to use all GPUs, or a list of specific GPU devices. */
90
+ gpus?: "all" | Array<{ capabilities?: Array<ComposeString>; count?: ComposeString | number; device_ids?: Array<ComposeString>; driver?: ComposeString; options?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString> }>;
91
+ /** Add additional groups which user inside the container should be member of. */
92
+ group_add?: Array<ComposeString | number>;
93
+ /** Configure a health check for the container to monitor its health status. */
94
+ healthcheck?: { disable?: boolean | ComposeString; interval?: ComposeString; retries?: number | ComposeString; test?: ComposeString | Array<ComposeString>; timeout?: ComposeString; start_period?: ComposeString; start_interval?: ComposeString; [key: `x-${string}`]: unknown };
95
+ /** Define a custom hostname for the service container. */
96
+ hostname?: ComposeString;
97
+ /** Specify the image to start the container from. Can be a repository/tag, a digest, or a local image ID. */
98
+ image?: ComposeString;
99
+ /** Run as an init process inside the container that forwards signals and reaps processes. */
100
+ init?: boolean | ComposeString;
101
+ /** IPC sharing mode for the service container. Use 'host' to share the host's IPC namespace, 'service:[service_name]' to share with another service, or 'shareable' to allow other services to share this service's IPC namespace. */
102
+ ipc?: ComposeString;
103
+ /** Container isolation technology to use. Supported values are platform-specific. */
104
+ isolation?: ComposeString;
105
+ /** Add metadata to containers using Docker labels. You can use either an array or a list. */
106
+ labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
107
+ /** Link to containers in another service. Either specify both the service name and a link alias (SERVICE:ALIAS), or just the service name. */
108
+ links?: Array<ComposeString>;
109
+ /** Logging configuration for the service. */
110
+ logging?: { driver?: ComposeString; options?: Record<string, ComposeString | number | null>; [key: `x-${string}`]: unknown };
111
+ /** Container MAC address to set. */
112
+ mac_address?: ComposeString;
113
+ /** Memory limit for the container. A string value can use suffix like '2g' for 2 gigabytes. */
114
+ mem_limit?: number | ComposeString;
115
+ /** Memory reservation for the container. */
116
+ mem_reservation?: ComposeString | number;
117
+ /** Container memory swappiness as percentage (0 to 100). */
118
+ mem_swappiness?: number | ComposeString;
119
+ /** Amount of memory the container is allowed to swap to disk. Set to -1 to enable unlimited swap. */
120
+ memswap_limit?: number | ComposeString;
121
+ /** Network mode. Values can be 'bridge', 'host', 'none', 'service:[service name]', or 'container:[container name]'. */
122
+ network_mode?: ComposeString;
123
+ /** AI Models to use, referencing entries under the top-level models key. */
124
+ models?: Array<ComposeString> | Record<string, { endpoint_var?: ComposeString; model_var?: ComposeString; [key: `x-${string}`]: unknown } | null>;
125
+ /** Networks to join, referencing entries under the top-level networks key. Can be a list of network names or a mapping of network name to network configuration. */
126
+ networks?: Array<ComposeString> | Record<string, { aliases?: Array<ComposeString>; interface_name?: ComposeString; ipv4_address?: ComposeString; ipv6_address?: ComposeString; link_local_ips?: Array<ComposeString>; mac_address?: ComposeString; driver_opts?: Record<string, ComposeString | number>; priority?: number; gw_priority?: number; [key: `x-${string}`]: unknown } | null>;
127
+ /** Disable OOM Killer for the container. */
128
+ oom_kill_disable?: boolean | ComposeString;
129
+ /** Tune host's OOM preferences for the container (accepts -1000 to 1000). */
130
+ oom_score_adj?: ComposeString | number;
131
+ /** PID mode for container. */
132
+ pid?: ComposeString | null;
133
+ /** Tune a container's PIDs limit. Set to -1 for unlimited PIDs. */
134
+ pids_limit?: number | ComposeString;
135
+ /** Target platform to run on, e.g., 'linux/amd64', 'linux/arm64', or 'windows/amd64'. */
136
+ platform?: ComposeString;
137
+ /** Expose container ports. Short format ([HOST:]CONTAINER[/PROTOCOL]). */
138
+ ports?: Array<number | ComposeString | { name?: ComposeString; mode?: ComposeString; host_ip?: ComposeString; target?: number | ComposeString; published?: ComposeString | number; protocol?: ComposeString; app_protocol?: ComposeString; [key: `x-${string}`]: unknown }>;
139
+ /** Init containers to run to completion before the service container is started. Each step runs in its own ephemeral container, in declared order; a non-zero exit fails the bring-up of the service and its dependents. */
140
+ pre_start?: Array<{ command?: null | ComposeString | Array<ComposeString>; image?: ComposeString; user?: ComposeString; privileged?: boolean | ComposeString; working_dir?: ComposeString; environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; per_replica?: boolean | ComposeString; [key: `x-${string}`]: unknown }>;
141
+ /** Commands to run after the container starts. If any command fails, the container stops. */
142
+ post_start?: Array<{ command: null | ComposeString | Array<ComposeString>; user?: ComposeString; privileged?: boolean | ComposeString; working_dir?: ComposeString; environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; [key: `x-${string}`]: unknown }>;
143
+ /** Commands to run before the container stops. If any command fails, the container stop is aborted. */
144
+ pre_stop?: Array<{ command: null | ComposeString | Array<ComposeString>; user?: ComposeString; privileged?: boolean | ComposeString; working_dir?: ComposeString; environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; [key: `x-${string}`]: unknown }>;
145
+ /** Give extended privileges to the service container. */
146
+ privileged?: boolean | ComposeString;
147
+ /** List of profiles for this service. When profiles are specified, services are only started when the profile is activated. */
148
+ profiles?: Array<ComposeString>;
149
+ /** Policy for pulling images. Options include: 'always', 'never', 'if_not_present', 'missing', 'build', or time-based refresh policies. */
150
+ pull_policy?: ComposeString;
151
+ /** Time after which to refresh the image. Used with pull_policy=refresh. */
152
+ pull_refresh_after?: ComposeString;
153
+ /** Mount the container's filesystem as read only. */
154
+ read_only?: boolean | ComposeString;
155
+ /** Restart policy for the service container. Options include: 'no', 'always', 'on-failure', and 'unless-stopped'. */
156
+ restart?: ComposeString;
157
+ /** Runtime to use for this container, e.g., 'runc'. */
158
+ runtime?: ComposeString;
159
+ /** Number of containers to deploy for this service. */
160
+ scale?: number | ComposeString;
161
+ /** Override the default labeling scheme for each container. */
162
+ security_opt?: Array<ComposeString>;
163
+ /** Size of /dev/shm. A string value can use suffix like '2g' for 2 gigabytes. */
164
+ shm_size?: number | ComposeString;
165
+ /** Grant access to Secrets on a per-service basis. */
166
+ secrets?: Array<ComposeString | { source?: ComposeString; target?: ComposeString; uid?: ComposeString; gid?: ComposeString; mode?: number | ComposeString; [key: `x-${string}`]: unknown }>;
167
+ /** Kernel parameters to set in the container. You can use either an array or a list. */
168
+ sysctls?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
169
+ /** Keep STDIN open even if not attached. */
170
+ stdin_open?: boolean | ComposeString;
171
+ /** Time to wait for the container to stop gracefully before sending SIGKILL (e.g., '1s', '1m30s'). */
172
+ stop_grace_period?: ComposeString;
173
+ /** Signal to stop the container (e.g., 'SIGTERM', 'SIGINT'). */
174
+ stop_signal?: ComposeString;
175
+ /** Storage driver options for the container. */
176
+ storage_opt?: Record<string, unknown>;
177
+ /** Mount a temporary filesystem (tmpfs) into the container. Can be a single value or a list. */
178
+ tmpfs?: ComposeString | Array<ComposeString>;
179
+ /** Allocate a pseudo-TTY to service container. */
180
+ tty?: boolean | ComposeString;
181
+ /** Override the default ulimits for a container. */
182
+ ulimits?: Record<string, number | ComposeString | { hard: number | ComposeString; soft: number | ComposeString; [key: `x-${string}`]: unknown }>;
183
+ /** Bind mount Docker API socket and required auth. */
184
+ use_api_socket?: boolean;
185
+ /** Username or UID to run the container process as. */
186
+ user?: ComposeString;
187
+ /** UTS namespace to use. 'host' shares the host's UTS namespace. */
188
+ uts?: ComposeString;
189
+ /** User namespace to use. 'host' shares the host's user namespace. */
190
+ userns_mode?: ComposeString;
191
+ /** Mount host paths or named volumes accessible to the container. Short syntax (VOLUME:CONTAINER_PATH[:MODE]) */
192
+ volumes?: Array<ComposeString | { type: "bind" | "volume" | "tmpfs" | "cluster" | "npipe" | "image"; source?: ComposeString; target?: ComposeString; read_only?: boolean | ComposeString; consistency?: ComposeString; bind?: { propagation?: ComposeString; create_host_path?: boolean | ComposeString; recursive?: "enabled" | "disabled" | "writable" | "readonly"; selinux?: "z" | "Z"; [key: `x-${string}`]: unknown }; volume?: { labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; nocopy?: boolean | ComposeString; subpath?: ComposeString; [key: `x-${string}`]: unknown }; tmpfs?: { size?: number | ComposeString; mode?: number | ComposeString; [key: `x-${string}`]: unknown }; image?: { subpath?: ComposeString; [key: `x-${string}`]: unknown }; [key: `x-${string}`]: unknown }>;
193
+ /** Mount volumes from another service or container. Optionally specify read-only access (ro) or read-write (rw). */
194
+ volumes_from?: Array<ComposeString>;
195
+ /** The working directory in which the entrypoint or command will be run */
196
+ working_dir?: ComposeString;
20
197
  }
21
- export declare const Service: new (props?: ServiceProps) => Declarable;
22
198
 
199
+ /** A named volume definition in Docker Compose */
23
200
  export interface VolumeProps {
24
- driver?: string;
25
- driver_opts?: Record<string, string>;
26
- external?: boolean;
27
- labels?: Record<string, string>;
28
- name?: string;
201
+ /** Custom name for this volume. */
202
+ name?: ComposeString;
203
+ /** Specify which volume driver should be used for this volume. */
204
+ driver?: ComposeString;
205
+ /** Specify driver-specific options. */
206
+ driver_opts?: Record<string, ComposeString | number>;
207
+ /** Specifies that this volume already exists and was created outside of Compose. */
208
+ external?: boolean | ComposeString | { name?: ComposeString; [key: `x-${string}`]: unknown };
209
+ /** Add metadata to the volume using labels. */
210
+ labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
29
211
  }
30
- export declare const Volume: new (props?: VolumeProps) => Declarable;
31
212
 
213
+ /** A network definition in Docker Compose */
32
214
  export interface NetworkProps {
33
- driver?: string;
34
- driver_opts?: Record<string, string>;
35
- external?: boolean;
36
- labels?: Record<string, string>;
37
- internal?: boolean;
38
- ipam?: object;
215
+ /** Custom name for this network. */
216
+ name?: ComposeString;
217
+ /** Specify which driver should be used for this network. Default is 'bridge'. */
218
+ driver?: ComposeString;
219
+ /** Specify driver-specific options defined as key/value pairs. */
220
+ driver_opts?: Record<string, ComposeString | number>;
221
+ /** Custom IP Address Management configuration for this network. */
222
+ ipam?: { driver?: ComposeString; config?: Array<{ subnet?: ComposeString; ip_range?: ComposeString; gateway?: ComposeString; aux_addresses?: Record<string, ComposeString>; [key: `x-${string}`]: unknown }>; options?: Record<string, ComposeString>; [key: `x-${string}`]: unknown };
223
+ /** Specifies that this network already exists and was created outside of Compose. */
224
+ external?: boolean | ComposeString | { name?: ComposeString; [key: `x-${string}`]: unknown };
225
+ /** Create an externally isolated network. */
226
+ internal?: boolean | ComposeString;
227
+ /** Enable IPv4 networking. */
228
+ enable_ipv4?: boolean | ComposeString;
229
+ /** Enable IPv6 networking. */
230
+ enable_ipv6?: boolean | ComposeString;
231
+ /** If true, standalone containers can attach to this network. */
232
+ attachable?: boolean | ComposeString;
233
+ /** Add metadata to the network using labels. */
234
+ labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
39
235
  }
40
- export declare const Network: new (props?: NetworkProps) => Declarable;
41
236
 
237
+ /** A config definition in Docker Compose */
42
238
  export interface DockerConfigProps {
43
- file?: string;
44
- content?: string;
45
- external?: boolean;
46
- labels?: Record<string, string>;
47
- name?: string;
239
+ /** Custom name for this config. */
240
+ name?: ComposeString;
241
+ /** Inline content of the config. */
242
+ content?: ComposeString;
243
+ /** Name of an environment variable from which to get the config value. */
244
+ environment?: ComposeString;
245
+ /** Path to a file containing the config value. */
246
+ file?: ComposeString;
247
+ /** Specifies that this config already exists and was created outside of Compose. */
248
+ external?: boolean | ComposeString | { name?: ComposeString };
249
+ /** Add metadata to the config using labels. */
250
+ labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
251
+ /** Driver to use for templating the config's value. */
252
+ template_driver?: ComposeString;
48
253
  }
49
- export declare const DockerConfig: new (props?: DockerConfigProps) => Declarable;
50
254
 
255
+ /** A secret definition in Docker Compose */
51
256
  export interface DockerSecretProps {
52
- file?: string;
53
- external?: boolean;
54
- labels?: Record<string, string>;
55
- name?: string;
257
+ /** Custom name for this secret. */
258
+ name?: ComposeString;
259
+ /** Name of an environment variable from which to get the secret value. */
260
+ environment?: ComposeString;
261
+ /** Path to a file containing the secret value. */
262
+ file?: ComposeString;
263
+ /** Specifies that this secret already exists and was created outside of Compose. */
264
+ external?: boolean | ComposeString | { name?: ComposeString };
265
+ /** Add metadata to the secret using labels. */
266
+ labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
267
+ /** Specify which secret driver should be used for this secret. */
268
+ driver?: ComposeString;
269
+ /** Specify driver-specific options. */
270
+ driver_opts?: Record<string, ComposeString | number>;
271
+ /** Driver to use for templating the secret's value. */
272
+ template_driver?: ComposeString;
56
273
  }
57
- export declare const DockerSecret: new (props?: DockerSecretProps) => Declarable;
274
+
275
+ export declare const Service: new (props?: ServiceProps, attributes?: Record<string, unknown>) => Declarable;
276
+ export declare const Volume: new (props?: VolumeProps, attributes?: Record<string, unknown>) => Declarable;
277
+ export declare const Network: new (props?: NetworkProps, attributes?: Record<string, unknown>) => Declarable;
278
+ export declare const DockerConfig: new (props?: DockerConfigProps, attributes?: Record<string, unknown>) => Declarable;
279
+ export declare const DockerSecret: new (props?: DockerSecretProps, attributes?: Record<string, unknown>) => Declarable;
58
280
 
59
281
  /** The Dockerfile instructions a step can name. FROM is the stage's own `from` field. */
60
282
  export type DockerfileInstructionName = "arg" | "env" | "run" | "copy" | "add" | "workdir" | "user" | "expose" | "volume" | "label" | "entrypoint" | "cmd" | "healthcheck" | "shell" | "stopsignal" | "onbuild";
@@ -172,4 +394,4 @@ export interface DockerfileProps {
172
394
  /** HEALTHCHECK as a per-kind field, written in the fixed order. Use `steps` to choose the order. */
173
395
  healthcheck?: string;
174
396
  }
175
- export declare const Dockerfile: new (props?: DockerfileProps) => Declarable;
397
+ export declare const Dockerfile: new (props?: DockerfileProps, attributes?: Record<string, unknown>) => Declarable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-docker",
3
- "version": "0.124.22",
3
+ "version": "0.124.24",
4
4
  "description": "Docker lexicon for chant — declarative IaC in TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -63,13 +63,13 @@
63
63
  "build": "../../scripts/tsc7.sh -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && find dist -type f \\( -name \"*.js\" -o -name \"*.js.map\" \\) -delete"
64
64
  },
65
65
  "dependencies": {
66
- "@intentius/chant-lexicon-otel": "^0.124.22"
66
+ "@intentius/chant-lexicon-otel": "^0.124.24"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@intentius/chant": "*",
70
70
  "typescript": "^5.9.3"
71
71
  },
72
72
  "peerDependencies": {
73
- "@intentius/chant": "^0.124.22"
73
+ "@intentius/chant": "^0.124.24"
74
74
  }
75
75
  }
@@ -314,11 +314,13 @@ A config definition in Docker Compose
314
314
 
315
315
  ## Properties
316
316
 
317
- - \`file\` (\`string\`): Path to the config file
318
- - \`content\` (\`string\`): Inline config content
319
- - \`external\` (\`boolean\`): Whether the config is external
320
- - \`labels\` (\`Record<string, string>\`): Config labels
321
- - \`name\` (\`string\`): Custom config name
317
+ - \`name\` (\`ComposeString\`): Custom name for this config.
318
+ - \`content\` (\`ComposeString\`): Inline content of the config.
319
+ - \`environment\` (\`ComposeString\`): Name of an environment variable from which to get the config value.
320
+ - \`file\` (\`ComposeString\`): Path to a file containing the config value.
321
+ - \`external\` (\`boolean | ComposeString | { name?: ComposeString }\`): Specifies that this config already exists and was created outside of Compose.
322
+ - \`labels\` (\`Record<string, ComposeString | number | boolean | null> | Array<ComposeString>\`): Add metadata to the config using labels.
323
+ - \`template_driver\` (\`ComposeString\`): Driver to use for templating the config's value.
322
324
  ",
323
325
  "path": "types/DockerConfig.md",
324
326
  },
@@ -372,10 +374,14 @@ A secret definition in Docker Compose
372
374
 
373
375
  ## Properties
374
376
 
375
- - \`file\` (\`string\`): Path to the secret file
376
- - \`external\` (\`boolean\`): Whether the secret is external
377
- - \`labels\` (\`Record<string, string>\`): Secret labels
378
- - \`name\` (\`string\`): Custom secret name
377
+ - \`name\` (\`ComposeString\`): Custom name for this secret.
378
+ - \`environment\` (\`ComposeString\`): Name of an environment variable from which to get the secret value.
379
+ - \`file\` (\`ComposeString\`): Path to a file containing the secret value.
380
+ - \`external\` (\`boolean | ComposeString | { name?: ComposeString }\`): Specifies that this secret already exists and was created outside of Compose.
381
+ - \`labels\` (\`Record<string, ComposeString | number | boolean | null> | Array<ComposeString>\`): Add metadata to the secret using labels.
382
+ - \`driver\` (\`ComposeString\`): Specify which secret driver should be used for this secret.
383
+ - \`driver_opts\` (\`Record<string, ComposeString | number>\`): Specify driver-specific options.
384
+ - \`template_driver\` (\`ComposeString\`): Driver to use for templating the secret's value.
379
385
  ",
380
386
  "path": "types/DockerSecret.md",
381
387
  },
@@ -392,12 +398,16 @@ A network definition in Docker Compose
392
398
 
393
399
  ## Properties
394
400
 
395
- - \`driver\` (\`string\`): Network driver
396
- - \`driver_opts\` (\`Record<string, string>\`): Driver options
397
- - \`external\` (\`boolean\`): Whether the network is external
398
- - \`labels\` (\`Record<string, string>\`): Network labels
399
- - \`internal\` (\`boolean\`): Restrict external access
400
- - \`ipam\` (\`object\`): IP address management
401
+ - \`name\` (\`ComposeString\`): Custom name for this network.
402
+ - \`driver\` (\`ComposeString\`): Specify which driver should be used for this network. Default is 'bridge'.
403
+ - \`driver_opts\` (\`Record<string, ComposeString | number>\`): Specify driver-specific options defined as key/value pairs.
404
+ - \`ipam\` (\`{ driver?: ComposeString; config?: Array<{ subnet?: ComposeString; ip_range?: ComposeString; gateway?: ComposeString; aux_addresses?: Record<string, ComposeString>; [key: \`x-\${string}\`]: unknown }>; options?: Record<string, ComposeString>; [key: \`x-\${string}\`]: unknown }\`): Custom IP Address Management configuration for this network.
405
+ - \`external\` (\`boolean | ComposeString | { name?: ComposeString; [key: \`x-\${string}\`]: unknown }\`): Specifies that this network already exists and was created outside of Compose.
406
+ - \`internal\` (\`boolean | ComposeString\`): Create an externally isolated network.
407
+ - \`enable_ipv4\` (\`boolean | ComposeString\`): Enable IPv4 networking.
408
+ - \`enable_ipv6\` (\`boolean | ComposeString\`): Enable IPv6 networking.
409
+ - \`attachable\` (\`boolean | ComposeString\`): If true, standalone containers can attach to this network.
410
+ - \`labels\` (\`Record<string, ComposeString | number | boolean | null> | Array<ComposeString>\`): Add metadata to the network using labels.
401
411
  ",
402
412
  "path": "types/Network.md",
403
413
  },
@@ -414,21 +424,99 @@ A containerized service definition in Docker Compose
414
424
 
415
425
  ## Properties
416
426
 
417
- - \`image\` (\`string\`): Container image to use
418
- - \`build\` (\`object\`): Build configuration
419
- - \`command\` (\`string | string[]\`): Override the default command
420
- - \`entrypoint\` (\`string | string[]\`): Override the default entrypoint
421
- - \`environment\` (\`Record<string, string>\`): Environment variables
422
- - \`ports\` (\`string[]\`): Published ports
423
- - \`volumes\` (\`string[]\`): Volume mounts
424
- - \`networks\` (\`string[]\`): Networks to attach
425
- - \`depends_on\` (\`string[] | Record<string, { condition: "service_started" | "service_healthy" | "service_completed_successfully"; restart?: boolean; required?: boolean }>\`): Service dependencies (short list-form, or long form with a wait condition)
426
- - \`restart\` (\`string\`): Restart policy
427
- - \`labels\` (\`Record<string, string>\`): Container labels
428
- - \`healthcheck\` (\`object\`): Health check configuration
429
- - \`deploy\` (\`object\`): Swarm deployment configuration
430
- - \`secrets\` (\`string[]\`): Secrets to expose
431
- - \`configs\` (\`Array<string | { source: string | Declarable; target?: string; uid?: string; gid?: string; mode?: number }>\`): Configs to expose (short form, or long form with a mount target)
427
+ - \`develop\` (\`{ watch?: Array<{ ignore?: ComposeString | Array<ComposeString>; include?: ComposeString | Array<ComposeString>; path: ComposeString; action: "rebuild" | "sync" | "restart" | "sync+restart" | "sync+exec"; target?: ComposeString; exec?: { command: null | ComposeString | Array<ComposeString>; user?: ComposeString; privileged?: boolean | ComposeString; working_dir?: ComposeString; environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; [key: \`x-\${string}\`]: unknown }; initial_sync?: boolean; [key: \`x-\${string}\`]: unknown }>; [key: \`x-\${string}\`]: unknown } | null\`)
428
+ - \`deploy\` (\`{ mode?: ComposeString; endpoint_mode?: ComposeString; replicas?: number | ComposeString; labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; rollback_config?: { parallelism?: number | ComposeString; delay?: ComposeString; failure_action?: ComposeString; monitor?: ComposeString; max_failure_ratio?: number | ComposeString; order?: "start-first" | "stop-first"; [key: \`x-\${string}\`]: unknown }; update_config?: { parallelism?: number | ComposeString; delay?: ComposeString; failure_action?: ComposeString; monitor?: ComposeString; max_failure_ratio?: number | ComposeString; order?: "start-first" | "stop-first"; [key: \`x-\${string}\`]: unknown }; resources?: { limits?: { cpus?: number | ComposeString; memory?: ComposeString; pids?: number | ComposeString; [key: \`x-\${string}\`]: unknown }; reservations?: { cpus?: number | ComposeString; memory?: ComposeString; generic_resources?: Array<{ discrete_resource_spec?: { kind?: ComposeString; value?: number | ComposeString; [key: \`x-\${string}\`]: unknown }; [key: \`x-\${string}\`]: unknown }>; devices?: Array<{ capabilities: Array<ComposeString>; count?: ComposeString | number; device_ids?: Array<ComposeString>; driver?: ComposeString; options?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; [key: \`x-\${string}\`]: unknown }>; [key: \`x-\${string}\`]: unknown }; [key: \`x-\${string}\`]: unknown }; restart_policy?: { condition?: ComposeString; delay?: ComposeString; max_attempts?: number | ComposeString; window?: ComposeString; [key: \`x-\${string}\`]: unknown }; placement?: { constraints?: Array<ComposeString>; preferences?: Array<{ spread?: ComposeString; [key: \`x-\${string}\`]: unknown }>; max_replicas_per_node?: number | ComposeString; [key: \`x-\${string}\`]: unknown }; [key: \`x-\${string}\`]: unknown } | null\`)
429
+ - \`annotations\` (\`Record<string, ComposeString | number | boolean | null> | Array<ComposeString>\`)
430
+ - \`attach\` (\`boolean | ComposeString\`)
431
+ - \`build\` (\`ComposeString | { context?: ComposeString; dockerfile?: ComposeString; dockerfile_inline?: ComposeString; entitlements?: Array<ComposeString>; args?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; ssh?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; cache_from?: Array<ComposeString>; cache_to?: Array<ComposeString>; no_cache?: boolean | ComposeString; no_cache_filter?: ComposeString | Array<ComposeString>; additional_contexts?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; network?: ComposeString; provenance?: ComposeString | boolean; sbom?: ComposeString | boolean; pull?: boolean | ComposeString; target?: ComposeString; shm_size?: number | ComposeString; extra_hosts?: Record<string, ComposeString | Array<ComposeString>> | Array<ComposeString>; isolation?: ComposeString; privileged?: boolean | ComposeString; secrets?: Array<ComposeString | { source?: ComposeString; target?: ComposeString; uid?: ComposeString; gid?: ComposeString; mode?: number | ComposeString; [key: \`x-\${string}\`]: unknown }>; tags?: Array<ComposeString>; ulimits?: Record<string, number | ComposeString | { hard: number | ComposeString; soft: number | ComposeString; [key: \`x-\${string}\`]: unknown }>; platforms?: Array<ComposeString>; [key: \`x-\${string}\`]: unknown }\`): Configuration options for building the service's image.
432
+ - \`blkio_config\` (\`{ device_read_bps?: Array<{ path?: ComposeString; rate?: number | ComposeString }>; device_read_iops?: Array<{ path?: ComposeString; rate?: number | ComposeString }>; device_write_bps?: Array<{ path?: ComposeString; rate?: number | ComposeString }>; device_write_iops?: Array<{ path?: ComposeString; rate?: number | ComposeString }>; weight?: number | ComposeString; weight_device?: Array<{ path?: ComposeString; weight?: number | ComposeString }> }\`): Block IO configuration for the service.
433
+ - \`cap_add\` (\`Array<ComposeString>\`): Add Linux capabilities. For example, 'CAP_SYS_ADMIN', 'SYS_ADMIN', or 'NET_ADMIN'.
434
+ - \`cap_drop\` (\`Array<ComposeString>\`): Drop Linux capabilities. For example, 'CAP_SYS_ADMIN', 'SYS_ADMIN', or 'NET_ADMIN'.
435
+ - \`cgroup\` (\`"host" | "private"\`): Specify the cgroup namespace to join. Use 'host' to use the host's cgroup namespace, or 'private' to use a private cgroup namespace.
436
+ - \`cgroup_parent\` (\`ComposeString\`): Specify an optional parent cgroup for the container.
437
+ - \`command\` (\`null | ComposeString | Array<ComposeString>\`): Override the default command declared by the container image, for example 'CMD' in Dockerfile.
438
+ - \`configs\` (\`Array<ComposeString | { source?: ComposeString; target?: ComposeString; uid?: ComposeString; gid?: ComposeString; mode?: number | ComposeString; [key: \`x-\${string}\`]: unknown }>\`): Grant access to Configs on a per-service basis.
439
+ - \`container_name\` (\`ComposeString\`): Specify a custom container name, rather than a generated default name.
440
+ - \`cpu_count\` (\`ComposeString | number\`): Number of usable CPUs.
441
+ - \`cpu_percent\` (\`ComposeString | number\`): Percentage of CPU resources to use.
442
+ - \`cpu_shares\` (\`number | ComposeString\`): CPU shares (relative weight) for the container.
443
+ - \`cpu_quota\` (\`number | ComposeString\`): Limit the CPU CFS (Completely Fair Scheduler) quota.
444
+ - \`cpu_period\` (\`number | ComposeString\`): Limit the CPU CFS (Completely Fair Scheduler) period.
445
+ - \`cpu_rt_period\` (\`number | ComposeString\`): Limit the CPU real-time period in microseconds or a duration.
446
+ - \`cpu_rt_runtime\` (\`number | ComposeString\`): Limit the CPU real-time runtime in microseconds or a duration.
447
+ - \`cpus\` (\`number | ComposeString\`): Number of CPUs to use. A floating-point value is supported to request partial CPUs.
448
+ - \`cpuset\` (\`ComposeString\`): CPUs in which to allow execution (0-3, 0,1).
449
+ - \`credential_spec\` (\`{ config?: ComposeString; file?: ComposeString; registry?: ComposeString; [key: \`x-\${string}\`]: unknown }\`): Configure the credential spec for managed service account.
450
+ - \`depends_on\` (\`Array<ComposeString> | Record<string, { restart?: boolean | ComposeString; required?: boolean; condition: "service_started" | "service_healthy" | "service_completed_successfully"; [key: \`x-\${string}\`]: unknown }>\`): Express dependency between services. Service dependencies cause services to be started in dependency order. The dependent service will wait for the dependency to be ready before starting.
451
+ - \`device_cgroup_rules\` (\`Array<ComposeString>\`): Add rules to the cgroup allowed devices list.
452
+ - \`devices\` (\`Array<ComposeString | { source: ComposeString; target?: ComposeString; permissions?: ComposeString; [key: \`x-\${string}\`]: unknown }>\`): List of device mappings for the container.
453
+ - \`dns\` (\`ComposeString | Array<ComposeString>\`): Custom DNS servers to set for the service container.
454
+ - \`dns_opt\` (\`Array<ComposeString>\`): Custom DNS options to be passed to the container's DNS resolver.
455
+ - \`dns_search\` (\`ComposeString | Array<ComposeString>\`): Custom DNS search domains to set on the service container.
456
+ - \`domainname\` (\`ComposeString\`): Custom domain name to use for the service container.
457
+ - \`entrypoint\` (\`null | ComposeString | Array<ComposeString>\`): Override the default entrypoint declared by the container image, for example 'ENTRYPOINT' in Dockerfile.
458
+ - \`env_file\` (\`ComposeString | Array<ComposeString | { path: ComposeString; format?: ComposeString; required?: boolean | ComposeString }>\`): Add environment variables from a file or multiple files. Can be a single file path or a list of file paths.
459
+ - \`label_file\` (\`ComposeString | Array<ComposeString>\`): Add metadata to containers using files containing Docker labels.
460
+ - \`environment\` (\`Record<string, ComposeString | number | boolean | null> | Array<ComposeString>\`): Add environment variables. You can use either an array or a list of KEY=VAL pairs.
461
+ - \`expose\` (\`Array<ComposeString | number>\`): Expose ports without publishing them to the host machine - they'll only be accessible to linked services.
462
+ - \`extends\` (\`ComposeString | { service: ComposeString; file?: ComposeString }\`): Extend another service, in the current file or another file.
463
+ - \`provider\` (\`{ type: ComposeString; options?: Record<string, ComposeString | number | boolean | Array<ComposeString | number | boolean>>; [key: \`x-\${string}\`]: unknown }\`): Specify a service which will not be manage by Compose directly, and delegate its management to an external provider.
464
+ - \`external_links\` (\`Array<ComposeString>\`): Link to services started outside this Compose application. Specify services as <service_name>:<alias>.
465
+ - \`extra_hosts\` (\`Record<string, ComposeString | Array<ComposeString>> | Array<ComposeString>\`): Add hostname mappings to the container network interface configuration.
466
+ - \`gpus\` (\`"all" | Array<{ capabilities?: Array<ComposeString>; count?: ComposeString | number; device_ids?: Array<ComposeString>; driver?: ComposeString; options?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString> }>\`): Define GPU devices to use. Can be set to 'all' to use all GPUs, or a list of specific GPU devices.
467
+ - \`group_add\` (\`Array<ComposeString | number>\`): Add additional groups which user inside the container should be member of.
468
+ - \`healthcheck\` (\`{ disable?: boolean | ComposeString; interval?: ComposeString; retries?: number | ComposeString; test?: ComposeString | Array<ComposeString>; timeout?: ComposeString; start_period?: ComposeString; start_interval?: ComposeString; [key: \`x-\${string}\`]: unknown }\`): Configure a health check for the container to monitor its health status.
469
+ - \`hostname\` (\`ComposeString\`): Define a custom hostname for the service container.
470
+ - \`image\` (\`ComposeString\`): Specify the image to start the container from. Can be a repository/tag, a digest, or a local image ID.
471
+ - \`init\` (\`boolean | ComposeString\`): Run as an init process inside the container that forwards signals and reaps processes.
472
+ - \`ipc\` (\`ComposeString\`): IPC sharing mode for the service container. Use 'host' to share the host's IPC namespace, 'service:[service_name]' to share with another service, or 'shareable' to allow other services to share this service's IPC namespace.
473
+ - \`isolation\` (\`ComposeString\`): Container isolation technology to use. Supported values are platform-specific.
474
+ - \`labels\` (\`Record<string, ComposeString | number | boolean | null> | Array<ComposeString>\`): Add metadata to containers using Docker labels. You can use either an array or a list.
475
+ - \`links\` (\`Array<ComposeString>\`): Link to containers in another service. Either specify both the service name and a link alias (SERVICE:ALIAS), or just the service name.
476
+ - \`logging\` (\`{ driver?: ComposeString; options?: Record<string, ComposeString | number | null>; [key: \`x-\${string}\`]: unknown }\`): Logging configuration for the service.
477
+ - \`mac_address\` (\`ComposeString\`): Container MAC address to set.
478
+ - \`mem_limit\` (\`number | ComposeString\`): Memory limit for the container. A string value can use suffix like '2g' for 2 gigabytes.
479
+ - \`mem_reservation\` (\`ComposeString | number\`): Memory reservation for the container.
480
+ - \`mem_swappiness\` (\`number | ComposeString\`): Container memory swappiness as percentage (0 to 100).
481
+ - \`memswap_limit\` (\`number | ComposeString\`): Amount of memory the container is allowed to swap to disk. Set to -1 to enable unlimited swap.
482
+ - \`network_mode\` (\`ComposeString\`): Network mode. Values can be 'bridge', 'host', 'none', 'service:[service name]', or 'container:[container name]'.
483
+ - \`models\` (\`Array<ComposeString> | Record<string, { endpoint_var?: ComposeString; model_var?: ComposeString; [key: \`x-\${string}\`]: unknown } | null>\`): AI Models to use, referencing entries under the top-level models key.
484
+ - \`networks\` (\`Array<ComposeString> | Record<string, { aliases?: Array<ComposeString>; interface_name?: ComposeString; ipv4_address?: ComposeString; ipv6_address?: ComposeString; link_local_ips?: Array<ComposeString>; mac_address?: ComposeString; driver_opts?: Record<string, ComposeString | number>; priority?: number; gw_priority?: number; [key: \`x-\${string}\`]: unknown } | null>\`): Networks to join, referencing entries under the top-level networks key. Can be a list of network names or a mapping of network name to network configuration.
485
+ - \`oom_kill_disable\` (\`boolean | ComposeString\`): Disable OOM Killer for the container.
486
+ - \`oom_score_adj\` (\`ComposeString | number\`): Tune host's OOM preferences for the container (accepts -1000 to 1000).
487
+ - \`pid\` (\`ComposeString | null\`): PID mode for container.
488
+ - \`pids_limit\` (\`number | ComposeString\`): Tune a container's PIDs limit. Set to -1 for unlimited PIDs.
489
+ - \`platform\` (\`ComposeString\`): Target platform to run on, e.g., 'linux/amd64', 'linux/arm64', or 'windows/amd64'.
490
+ - \`ports\` (\`Array<number | ComposeString | { name?: ComposeString; mode?: ComposeString; host_ip?: ComposeString; target?: number | ComposeString; published?: ComposeString | number; protocol?: ComposeString; app_protocol?: ComposeString; [key: \`x-\${string}\`]: unknown }>\`): Expose container ports. Short format ([HOST:]CONTAINER[/PROTOCOL]).
491
+ - \`pre_start\` (\`Array<{ command?: null | ComposeString | Array<ComposeString>; image?: ComposeString; user?: ComposeString; privileged?: boolean | ComposeString; working_dir?: ComposeString; environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; per_replica?: boolean | ComposeString; [key: \`x-\${string}\`]: unknown }>\`): Init containers to run to completion before the service container is started. Each step runs in its own ephemeral container, in declared order; a non-zero exit fails the bring-up of the service and its dependents.
492
+ - \`post_start\` (\`Array<{ command: null | ComposeString | Array<ComposeString>; user?: ComposeString; privileged?: boolean | ComposeString; working_dir?: ComposeString; environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; [key: \`x-\${string}\`]: unknown }>\`): Commands to run after the container starts. If any command fails, the container stops.
493
+ - \`pre_stop\` (\`Array<{ command: null | ComposeString | Array<ComposeString>; user?: ComposeString; privileged?: boolean | ComposeString; working_dir?: ComposeString; environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; [key: \`x-\${string}\`]: unknown }>\`): Commands to run before the container stops. If any command fails, the container stop is aborted.
494
+ - \`privileged\` (\`boolean | ComposeString\`): Give extended privileges to the service container.
495
+ - \`profiles\` (\`Array<ComposeString>\`): List of profiles for this service. When profiles are specified, services are only started when the profile is activated.
496
+ - \`pull_policy\` (\`ComposeString\`): Policy for pulling images. Options include: 'always', 'never', 'if_not_present', 'missing', 'build', or time-based refresh policies.
497
+ - \`pull_refresh_after\` (\`ComposeString\`): Time after which to refresh the image. Used with pull_policy=refresh.
498
+ - \`read_only\` (\`boolean | ComposeString\`): Mount the container's filesystem as read only.
499
+ - \`restart\` (\`ComposeString\`): Restart policy for the service container. Options include: 'no', 'always', 'on-failure', and 'unless-stopped'.
500
+ - \`runtime\` (\`ComposeString\`): Runtime to use for this container, e.g., 'runc'.
501
+ - \`scale\` (\`number | ComposeString\`): Number of containers to deploy for this service.
502
+ - \`security_opt\` (\`Array<ComposeString>\`): Override the default labeling scheme for each container.
503
+ - \`shm_size\` (\`number | ComposeString\`): Size of /dev/shm. A string value can use suffix like '2g' for 2 gigabytes.
504
+ - \`secrets\` (\`Array<ComposeString | { source?: ComposeString; target?: ComposeString; uid?: ComposeString; gid?: ComposeString; mode?: number | ComposeString; [key: \`x-\${string}\`]: unknown }>\`): Grant access to Secrets on a per-service basis.
505
+ - \`sysctls\` (\`Record<string, ComposeString | number | boolean | null> | Array<ComposeString>\`): Kernel parameters to set in the container. You can use either an array or a list.
506
+ - \`stdin_open\` (\`boolean | ComposeString\`): Keep STDIN open even if not attached.
507
+ - \`stop_grace_period\` (\`ComposeString\`): Time to wait for the container to stop gracefully before sending SIGKILL (e.g., '1s', '1m30s').
508
+ - \`stop_signal\` (\`ComposeString\`): Signal to stop the container (e.g., 'SIGTERM', 'SIGINT').
509
+ - \`storage_opt\` (\`Record<string, unknown>\`): Storage driver options for the container.
510
+ - \`tmpfs\` (\`ComposeString | Array<ComposeString>\`): Mount a temporary filesystem (tmpfs) into the container. Can be a single value or a list.
511
+ - \`tty\` (\`boolean | ComposeString\`): Allocate a pseudo-TTY to service container.
512
+ - \`ulimits\` (\`Record<string, number | ComposeString | { hard: number | ComposeString; soft: number | ComposeString; [key: \`x-\${string}\`]: unknown }>\`): Override the default ulimits for a container.
513
+ - \`use_api_socket\` (\`boolean\`): Bind mount Docker API socket and required auth.
514
+ - \`user\` (\`ComposeString\`): Username or UID to run the container process as.
515
+ - \`uts\` (\`ComposeString\`): UTS namespace to use. 'host' shares the host's UTS namespace.
516
+ - \`userns_mode\` (\`ComposeString\`): User namespace to use. 'host' shares the host's user namespace.
517
+ - \`volumes\` (\`Array<ComposeString | { type: "bind" | "volume" | "tmpfs" | "cluster" | "npipe" | "image"; source?: ComposeString; target?: ComposeString; read_only?: boolean | ComposeString; consistency?: ComposeString; bind?: { propagation?: ComposeString; create_host_path?: boolean | ComposeString; recursive?: "enabled" | "disabled" | "writable" | "readonly"; selinux?: "z" | "Z"; [key: \`x-\${string}\`]: unknown }; volume?: { labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; nocopy?: boolean | ComposeString; subpath?: ComposeString; [key: \`x-\${string}\`]: unknown }; tmpfs?: { size?: number | ComposeString; mode?: number | ComposeString; [key: \`x-\${string}\`]: unknown }; image?: { subpath?: ComposeString; [key: \`x-\${string}\`]: unknown }; [key: \`x-\${string}\`]: unknown }>\`): Mount host paths or named volumes accessible to the container. Short syntax (VOLUME:CONTAINER_PATH[:MODE])
518
+ - \`volumes_from\` (\`Array<ComposeString>\`): Mount volumes from another service or container. Optionally specify read-only access (ro) or read-write (rw).
519
+ - \`working_dir\` (\`ComposeString\`): The working directory in which the entrypoint or command will be run
432
520
 
433
521
  ## Governed by
434
522
 
@@ -451,11 +539,11 @@ A named volume definition in Docker Compose
451
539
 
452
540
  ## Properties
453
541
 
454
- - \`driver\` (\`string\`): Volume driver
455
- - \`driver_opts\` (\`Record<string, string>\`): Driver options
456
- - \`external\` (\`boolean\`): Whether the volume is external
457
- - \`labels\` (\`Record<string, string>\`): Volume labels
458
- - \`name\` (\`string\`): Custom volume name
542
+ - \`name\` (\`ComposeString\`): Custom name for this volume.
543
+ - \`driver\` (\`ComposeString\`): Specify which volume driver should be used for this volume.
544
+ - \`driver_opts\` (\`Record<string, ComposeString | number>\`): Specify driver-specific options.
545
+ - \`external\` (\`boolean | ComposeString | { name?: ComposeString; [key: \`x-\${string}\`]: unknown }\`): Specifies that this volume already exists and was created outside of Compose.
546
+ - \`labels\` (\`Record<string, ComposeString | number | boolean | null> | Array<ComposeString>\`): Add metadata to the volume using labels.
459
547
 
460
548
  ## Governed by
461
549