github.com/khulnasoft/cli@v0.0.0-20240402070845-01bcad7beefa/cli/compose/loader/testdata/full-example.yaml.golden (about) 1 version: "3.12" 2 services: 3 foo: 4 build: 5 context: ./dir 6 dockerfile: Dockerfile 7 args: 8 foo: bar 9 labels: 10 FOO: BAR 11 cache_from: 12 - foo 13 - bar 14 extra_hosts: 15 - ipv4.example.com:127.0.0.1 16 - ipv6.example.com:::1 17 network: foo 18 target: foo 19 cap_add: 20 - ALL 21 cap_drop: 22 - NET_ADMIN 23 - SYS_ADMIN 24 cgroup_parent: m-executor-abcd 25 command: 26 - bundle 27 - exec 28 - thin 29 - -p 30 - "3000" 31 configs: 32 - source: config1 33 - source: config2 34 target: /my_config 35 uid: "103" 36 gid: "103" 37 mode: 288 38 container_name: my-web-container 39 depends_on: 40 - db 41 - redis 42 deploy: 43 mode: replicated 44 replicas: 6 45 labels: 46 FOO: BAR 47 update_config: 48 parallelism: 3 49 delay: 10s 50 failure_action: continue 51 monitor: 1m0s 52 max_failure_ratio: 0.3 53 order: start-first 54 rollback_config: 55 parallelism: 3 56 delay: 10s 57 failure_action: continue 58 monitor: 1m0s 59 max_failure_ratio: 0.3 60 order: start-first 61 resources: 62 limits: 63 cpus: "0.001" 64 memory: "52428800" 65 pids: 100 66 reservations: 67 cpus: "0.0001" 68 memory: "20971520" 69 generic_resources: 70 - discrete_resource_spec: 71 kind: gpu 72 value: 2 73 - discrete_resource_spec: 74 kind: ssd 75 value: 1 76 restart_policy: 77 condition: on-failure 78 delay: 5s 79 max_attempts: 3 80 window: 2m0s 81 placement: 82 constraints: 83 - node=foo 84 preferences: 85 - spread: node.labels.az 86 max_replicas_per_node: 5 87 endpoint_mode: dnsrr 88 devices: 89 - /dev/ttyUSB0:/dev/ttyUSB0 90 dns: 91 - 8.8.8.8 92 - 9.9.9.9 93 dns_search: 94 - dc1.example.com 95 - dc2.example.com 96 domainname: foo.com 97 entrypoint: 98 - /code/entrypoint.sh 99 - -p 100 - "3000" 101 environment: 102 BAR: bar_from_env_file_2 103 BAZ: baz_from_service_def 104 FOO: foo_from_env_file 105 QUX: qux_from_environment 106 env_file: 107 - ./example1.env 108 - ./example2.env 109 expose: 110 - "3000" 111 - "8000" 112 external_links: 113 - redis_1 114 - project_db_1:mysql 115 - project_db_1:postgresql 116 extra_hosts: 117 - somehost:162.242.195.82 118 - otherhost:50.31.209.229 119 - host.docker.internal:host-gateway 120 hostname: foo 121 healthcheck: 122 test: 123 - CMD-SHELL 124 - echo "hello world" 125 timeout: 1s 126 interval: 10s 127 retries: 5 128 start_period: 15s 129 start_interval: 1s 130 image: redis 131 ipc: host 132 labels: 133 com.example.description: Accounting webapp 134 com.example.empty-label: "" 135 com.example.number: "42" 136 links: 137 - db 138 - db:database 139 - redis 140 logging: 141 driver: syslog 142 options: 143 syslog-address: tcp://192.168.0.42:123 144 mac_address: 02:42:ac:11:65:43 145 network_mode: container:0cfeab0f748b9a743dc3da582046357c6ef497631c1a016d28d2bf9b4f899f7b 146 networks: 147 other-network: 148 ipv4_address: 172.16.238.10 149 ipv6_address: 2001:3984:3989::10 150 other-other-network: null 151 some-network: 152 aliases: 153 - alias1 154 - alias3 155 pid: host 156 ports: 157 - mode: ingress 158 target: 3000 159 protocol: tcp 160 - mode: ingress 161 target: 3001 162 protocol: tcp 163 - mode: ingress 164 target: 3002 165 protocol: tcp 166 - mode: ingress 167 target: 3003 168 protocol: tcp 169 - mode: ingress 170 target: 3004 171 protocol: tcp 172 - mode: ingress 173 target: 3005 174 protocol: tcp 175 - mode: ingress 176 target: 8000 177 published: 8000 178 protocol: tcp 179 - mode: ingress 180 target: 8080 181 published: 9090 182 protocol: tcp 183 - mode: ingress 184 target: 8081 185 published: 9091 186 protocol: tcp 187 - mode: ingress 188 target: 22 189 published: 49100 190 protocol: tcp 191 - mode: ingress 192 target: 8001 193 published: 8001 194 protocol: tcp 195 - mode: ingress 196 target: 5000 197 published: 5000 198 protocol: tcp 199 - mode: ingress 200 target: 5001 201 published: 5001 202 protocol: tcp 203 - mode: ingress 204 target: 5002 205 published: 5002 206 protocol: tcp 207 - mode: ingress 208 target: 5003 209 published: 5003 210 protocol: tcp 211 - mode: ingress 212 target: 5004 213 published: 5004 214 protocol: tcp 215 - mode: ingress 216 target: 5005 217 published: 5005 218 protocol: tcp 219 - mode: ingress 220 target: 5006 221 published: 5006 222 protocol: tcp 223 - mode: ingress 224 target: 5007 225 published: 5007 226 protocol: tcp 227 - mode: ingress 228 target: 5008 229 published: 5008 230 protocol: tcp 231 - mode: ingress 232 target: 5009 233 published: 5009 234 protocol: tcp 235 - mode: ingress 236 target: 5010 237 published: 5010 238 protocol: tcp 239 privileged: true 240 read_only: true 241 restart: always 242 secrets: 243 - source: secret1 244 - source: secret2 245 target: my_secret 246 uid: "103" 247 gid: "103" 248 mode: 288 249 security_opt: 250 - label=level:s0:c100,c200 251 - label=type:svirt_apache_t 252 stdin_open: true 253 stop_grace_period: 20s 254 stop_signal: SIGUSR1 255 sysctls: 256 net.core.somaxconn: "1024" 257 net.ipv4.tcp_syncookies: "0" 258 tmpfs: 259 - /run 260 - /tmp 261 tty: true 262 ulimits: 263 nofile: 264 soft: 20000 265 hard: 40000 266 nproc: 65535 267 user: someone 268 volumes: 269 - type: volume 270 target: /var/lib/mysql 271 - type: bind 272 source: /opt/data 273 target: /var/lib/mysql 274 - type: bind 275 source: /foo 276 target: /code 277 - type: bind 278 source: /foo/static 279 target: /var/www/html 280 - type: bind 281 source: /bar/configs 282 target: /etc/configs/ 283 read_only: true 284 - type: volume 285 source: datavolume 286 target: /var/lib/mysql 287 - type: bind 288 source: /foo/opt 289 target: /opt 290 consistency: cached 291 - type: tmpfs 292 target: /opt 293 tmpfs: 294 size: 10000 295 - type: cluster 296 source: group:mygroup 297 target: /srv 298 working_dir: /code 299 x-bar: baz 300 x-foo: bar 301 networks: 302 external-network: 303 name: external-network 304 external: true 305 other-external-network: 306 name: my-cool-network 307 external: true 308 x-bar: baz 309 x-foo: bar 310 other-network: 311 driver: overlay 312 driver_opts: 313 baz: "1" 314 foo: bar 315 ipam: 316 driver: overlay 317 config: 318 - subnet: 172.16.238.0/24 319 - subnet: 2001:3984:3989::/64 320 labels: 321 foo: bar 322 some-network: {} 323 volumes: 324 another-volume: 325 name: user_specified_name 326 driver: vsphere 327 driver_opts: 328 baz: "1" 329 foo: bar 330 cluster-volume: 331 driver: my-csi-driver 332 x-cluster-spec: 333 group: mygroup 334 access_mode: 335 scope: single 336 sharing: none 337 block_volume: {} 338 accessibility_requirements: 339 requisite: 340 - segments: 341 region: R1 342 zone: Z1 343 - segments: 344 region: R1 345 zone: Z2 346 preferred: 347 - segments: 348 region: R1 349 zone: Z1 350 capacity_range: 351 required_bytes: "1073741824" 352 limit_bytes: "8589934592" 353 secrets: 354 - key: mycsisecret 355 secret: secret1 356 - key: mycsisecret2 357 secret: secret4 358 availability: active 359 external-volume: 360 name: external-volume 361 external: true 362 external-volume3: 363 name: this-is-volume3 364 external: true 365 x-bar: baz 366 x-foo: bar 367 other-external-volume: 368 name: my-cool-volume 369 external: true 370 other-volume: 371 driver: flocker 372 driver_opts: 373 baz: "1" 374 foo: bar 375 labels: 376 foo: bar 377 some-volume: {} 378 secrets: 379 secret1: 380 file: /foo/secret_data 381 labels: 382 foo: bar 383 secret2: 384 name: my_secret 385 external: true 386 secret3: 387 name: secret3 388 external: true 389 secret4: 390 name: bar 391 file: /foo 392 x-bar: baz 393 x-foo: bar 394 configs: 395 config1: 396 file: /foo/config_data 397 labels: 398 foo: bar 399 config2: 400 name: my_config 401 external: true 402 config3: 403 name: config3 404 external: true 405 config4: 406 name: foo 407 file: /foo 408 x-bar: baz 409 x-foo: bar 410 x-bar: baz 411 x-foo: bar 412 x-nested: 413 bar: baz 414 foo: bar