@@ -172,16 +172,6 @@ export type ServiceConfigOrSecret = (
172
172
mode ?: number | string ;
173
173
}
174
174
) [ ] ;
175
- export type EnvFile =
176
- | string
177
- | (
178
- | string
179
- | {
180
- path : string ;
181
- format ?: string ;
182
- required ?: boolean | string ;
183
- }
184
- ) [ ] ;
185
175
export type LabelFile = string | string [ ] ;
186
176
export type Gpus =
187
177
| "all"
@@ -193,12 +183,32 @@ export type Gpus =
193
183
options ?: ListOrDict ;
194
184
[ k : string ] : unknown ;
195
185
} [ ] ;
186
+ /**
187
+ * Profiles that this service is a part of. When the profile is started, this service will be started.
188
+ */
189
+ export type ListOfStrings1 = string [ ] ;
190
+ /**
191
+ * Secrets the service will have access to
192
+ */
193
+ export type ServiceConfigOrSecret1 = (
194
+ | string
195
+ | {
196
+ source ?: string ;
197
+ target ?: string ;
198
+ uid ?: string ;
199
+ gid ?: string ;
200
+ mode ?: number | string ;
201
+ }
202
+ ) [ ] ;
196
203
/**
197
204
* This interface was referenced by `undefined`'s JSON-Schema definition
198
205
* via the `patternProperty` "^[a-zA-Z0-9._-]+$".
199
206
*/
200
207
export type Network = {
201
208
name ?: string ;
209
+ /**
210
+ * The driver used for this network
211
+ */
202
212
driver ?: string ;
203
213
driver_opts ?: {
204
214
/**
@@ -246,6 +256,9 @@ export type Network = {
246
256
} & Network1 ;
247
257
export type Network1 = {
248
258
name ?: string ;
259
+ /**
260
+ * The driver used for this network
261
+ */
249
262
driver ?: string ;
250
263
driver_opts ?: {
251
264
/**
@@ -297,6 +310,9 @@ export type Network1 = {
297
310
*/
298
311
export type Volume = {
299
312
name ?: string ;
313
+ /**
314
+ * The driver used for this volume
315
+ */
300
316
driver ?: string ;
301
317
driver_opts ?: {
302
318
/**
@@ -318,6 +334,9 @@ export type Volume = {
318
334
} & Volume1 ;
319
335
export type Volume1 = {
320
336
name ?: string ;
337
+ /**
338
+ * The driver used for this volume
339
+ */
321
340
driver ?: string ;
322
341
driver_opts ?: {
323
342
/**
@@ -354,18 +373,33 @@ export interface Compose {
354
373
* compose sub-projects to be included.
355
374
*/
356
375
include ?: Include [ ] ;
376
+ /**
377
+ * The services in your project
378
+ */
357
379
services ?: {
358
380
[ k : string ] : Service ;
359
381
} ;
382
+ /**
383
+ * Networks that are shared among multiple services
384
+ */
360
385
networks ?: {
361
386
[ k : string ] : Network ;
362
387
} ;
388
+ /**
389
+ * Named volumes that are shared among multiple services
390
+ */
363
391
volumes ?: {
364
392
[ k : string ] : Volume ;
365
393
} ;
394
+ /**
395
+ * Secrets that are shared among multiple services
396
+ */
366
397
secrets ?: {
367
398
[ k : string ] : Secret ;
368
399
} ;
400
+ /**
401
+ * Configurations for services in the project
402
+ */
369
403
configs ?: {
370
404
[ k : string ] : Config ;
371
405
} ;
@@ -382,11 +416,28 @@ export interface Service {
382
416
build ?:
383
417
| string
384
418
| {
419
+ /**
420
+ * The context used for building the image
421
+ */
385
422
context ?: string ;
423
+ /**
424
+ * The Dockerfile used for building the image
425
+ */
386
426
dockerfile ?: string ;
387
427
dockerfile_inline ?: string ;
388
428
entitlements ?: string [ ] ;
389
- args ?: ListOrDict ;
429
+ /**
430
+ * Arguments used during the image build process
431
+ */
432
+ args ?:
433
+ | {
434
+ /**
435
+ * This interface was referenced by `undefined`'s JSON-Schema definition
436
+ * via the `patternProperty` ".+".
437
+ */
438
+ [ k : string ] : string | number | boolean | null ;
439
+ }
440
+ | string [ ] ;
390
441
ssh ?: ListOrDict ;
391
442
labels ?: ListOrDict ;
392
443
cache_from ?: string [ ] ;
@@ -417,8 +468,14 @@ export interface Service {
417
468
cap_drop ?: string [ ] ;
418
469
cgroup ?: "host" | "private" ;
419
470
cgroup_parent ?: string ;
420
- command ?: Command ;
471
+ /**
472
+ * The command that will be run in the container
473
+ */
474
+ command ?: null | string | string [ ] ;
421
475
configs ?: ServiceConfigOrSecret ;
476
+ /**
477
+ * The name that will be given to the container
478
+ */
422
479
container_name ?: string ;
423
480
cpu_count ?: string | number ;
424
481
cpu_percent ?: string | number ;
@@ -434,6 +491,9 @@ export interface Service {
434
491
file ?: string ;
435
492
registry ?: string ;
436
493
} ;
494
+ /**
495
+ * Other services that this service depends on, which will be started before this one
496
+ */
437
497
depends_on ?:
438
498
| ListOfStrings
439
499
| {
@@ -460,10 +520,39 @@ export interface Service {
460
520
dns_opt ?: string [ ] ;
461
521
dns_search ?: StringOrList ;
462
522
domainname ?: string ;
463
- entrypoint ?: Command ;
464
- env_file ?: EnvFile ;
523
+ /**
524
+ * The entrypoint to the application in the container
525
+ */
526
+ entrypoint ?: null | string | string [ ] ;
527
+ /**
528
+ * Files containing environment variables that will be included
529
+ */
530
+ env_file ?:
531
+ | string
532
+ | (
533
+ | string
534
+ | {
535
+ path : string ;
536
+ format ?: string ;
537
+ required ?: boolean | string ;
538
+ }
539
+ ) [ ] ;
465
540
label_file ?: LabelFile ;
466
- environment ?: ListOrDict ;
541
+ /**
542
+ * Environment variables that will be included
543
+ */
544
+ environment ?:
545
+ | {
546
+ /**
547
+ * This interface was referenced by `undefined`'s JSON-Schema definition
548
+ * via the `patternProperty` ".+".
549
+ */
550
+ [ k : string ] : string | number | boolean | null ;
551
+ }
552
+ | string [ ] ;
553
+ /**
554
+ * Ports exposed to the other services but not to the host machine
555
+ */
467
556
expose ?: ( string | number ) [ ] ;
468
557
extends ?:
469
558
| string
@@ -487,12 +576,29 @@ export interface Service {
487
576
group_add ?: ( string | number ) [ ] ;
488
577
healthcheck ?: Healthcheck ;
489
578
hostname ?: string ;
579
+ /**
580
+ * The image that will be pulled for the service. If `build` is specified, the built image will be given this tag.
581
+ */
490
582
image ?: string ;
491
583
init ?: boolean | string ;
492
584
ipc ?: string ;
493
585
isolation ?: string ;
494
- labels ?: ListOrDict ;
586
+ /**
587
+ * Labels that will be given to the container
588
+ */
589
+ labels ?:
590
+ | {
591
+ /**
592
+ * This interface was referenced by `undefined`'s JSON-Schema definition
593
+ * via the `patternProperty` ".+".
594
+ */
595
+ [ k : string ] : string | number | boolean | null ;
596
+ }
597
+ | string [ ] ;
495
598
links ?: string [ ] ;
599
+ /**
600
+ * Settings for logging for this service
601
+ */
496
602
logging ?: {
497
603
driver ?: string ;
498
604
options ?: {
@@ -509,6 +615,9 @@ export interface Service {
509
615
mem_swappiness ?: number | string ;
510
616
memswap_limit ?: number | string ;
511
617
network_mode ?: string ;
618
+ /**
619
+ * The service will be included in these networks, allowing it to reach other containers on the same network
620
+ */
512
621
networks ?:
513
622
| ListOfStrings
514
623
| {
@@ -539,6 +648,9 @@ export interface Service {
539
648
pid ?: string | null ;
540
649
pids_limit ?: number | string ;
541
650
platform ?: string ;
651
+ /**
652
+ * Ports that will be exposed to the host
653
+ */
542
654
ports ?: (
543
655
| number
544
656
| string
@@ -555,7 +667,7 @@ export interface Service {
555
667
post_start ?: ServiceHook [ ] ;
556
668
pre_stop ?: ServiceHook [ ] ;
557
669
privileged ?: boolean | string ;
558
- profiles ?: ListOfStrings ;
670
+ profiles ?: ListOfStrings1 ;
559
671
pull_policy ?: string ;
560
672
pull_refresh_after ?: string ;
561
673
read_only ?: boolean | string ;
@@ -564,7 +676,7 @@ export interface Service {
564
676
scale ?: number | string ;
565
677
security_opt ?: string [ ] ;
566
678
shm_size ?: number | string ;
567
- secrets ?: ServiceConfigOrSecret ;
679
+ secrets ?: ServiceConfigOrSecret1 ;
568
680
sysctls ?: ListOrDict ;
569
681
stdin_open ?: boolean | string ;
570
682
stop_grace_period ?: string ;
@@ -575,9 +687,15 @@ export interface Service {
575
687
tmpfs ?: StringOrList ;
576
688
tty ?: boolean | string ;
577
689
ulimits ?: Ulimits ;
690
+ /**
691
+ * The username under which the app in the container will be started
692
+ */
578
693
user ?: string ;
579
694
uts ?: string ;
580
695
userns_mode ?: string ;
696
+ /**
697
+ * Named volumes and paths on the host mapped to paths in the container
698
+ */
581
699
volumes ?: (
582
700
| string
583
701
| {
@@ -607,6 +725,9 @@ export interface Service {
607
725
}
608
726
) [ ] ;
609
727
volumes_from ?: string [ ] ;
728
+ /**
729
+ * The working directory in which the entrypoint or command will be run
730
+ */
610
731
working_dir ?: string ;
611
732
}
612
733
export interface ServiceHook {
@@ -636,6 +757,9 @@ export interface BlkioWeight {
636
757
path ?: string ;
637
758
weight ?: number | string ;
638
759
}
760
+ /**
761
+ * A command for checking if the container is healthy
762
+ */
639
763
export interface Healthcheck {
640
764
disable ?: boolean | string ;
641
765
interval ?: string ;
0 commit comments