services: foo: blkio_config: weight: 300 weight_device: - path: /dev/sda weight: 400 device_read_bps: - path: /dev/sdb rate: '12mb' device_read_iops: - path: /dev/sdb rate: 120 device_write_bps: - path: /dev/sdb rate: '1024k' device_write_iops: - path: /dev/sdb rate: 30 build: ./foo cap_add: - ALL cap_drop: - NET_ADMIN - SYS_ADMIN cgroup_parent: m-executor-abcd command: bundle exec thin -p 3000 container_name: my-web-container cpuset: 0-3 depends_on: - bar - baz deploy: resources: limits: cpus: '0.50' memory: 50M pids: 1 reservations: cpus: '0.25' memory: 20M device_cgroup_rules: - 'c 1:3 mr' - 'a 7:* rmw' devices: - '/dev/ttyUSB0:/dev/ttyUSB0' - './dev/sda:/dev/xvda:rwm' dns: 8.8.8.8 dns_opt: - use-vc - no-tld-query dns_search: example.com entrypoint: /code/entrypoint.sh env_file: .env environment: RACK_ENV: development SHOW: 'true' USER_INPUT: expose: - '3000' - '8000' external_links: - redis - database:mysql - database:postgresql extra_hosts: - 'somehost:162.242.195.82' - 'otherhost:50.31.209.229' group_add: - mail healthcheck: test: ['CMD', 'curl', '-f', 'http://localhost'] interval: 1m30s timeout: 10s retries: 3 start_period: 40s disable: true image: foo ipc: 'shareable' labels: com.example.description: 'Accounting webapp' com.example.department: 'Finance' com.example.label-with-empty-value: '' links: - bar - bar:database - baz logging: driver: syslog options: syslog-address: 'tcp://192.168.0.42:123' memswap_limit: 1g networks: - foo - bar ports: - 3000 - '3000-3005' - '8000:8000' - '9090-9091:8080-8081' - '49100:22' - '127.0.0.1:8001:8001' - '127.0.0.1:5000-5010:5000-5010' - '6060:6060/udp' pull_policy: always restart: on-failure secrets: - server-certificate security_opt: - label:user:USER - label:role:ROLE - no-new-privileges sysctls: net.core.somaxconn: 1024 net.ipv4.tcp_syncookies: 0 tmpfs: /run ulimits: nproc: 65535 nofile: soft: 20000 hard: 40000 volumes: - type: volume source: foo target: /foo volume: nocopy: true - type: bind source: ./var/run/postgres/postgres.sock target: /var/run/postgres/postgres.sock volumes_from: - service_name - service_name:ro - container:container_name - container:container_name:rw bar: build: context: bar dockerfile: ../bar.Dockerfile args: - GIT_COMMIT=cdc3b19 ssh: - myproject=~/.ssh/myproject.pem cache_from: - alpine:latest - type=local,src=path/to/cache - type=gha cache_to: - user/app:cache - type=local,dest=path/to/cache extra_hosts: - 'somehost:162.242.195.82' - 'otherhost:50.31.209.229' labels: - 'com.example.description=Accounting webapp' - 'com.example.department=Finance' - 'com.example.label-with-empty-value' shm_size: '2gb' target: prod tags: - 'myimage:mytag' - 'registry/username/myrepos:my-other-tag' platforms: - 'linux/amd64' - 'linux/arm64' command: ['bundle', 'exec', 'thin', '-p', '3000'] cpuset: 0,1 dns: - 8.8.8.8 - 9.9.9.9 dns_search: - dc1.example.com - dc2.example.com entrypoint: - php - -d - zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so - -d - memory_limit=-1 - vendor/bin/phpunit env_file: - ./a.env - ./b.env environment: - RACK_ENV=development - SHOW=true - USER_INPUT image: bar ipc: 'service:[service name]' labels: - 'com.example.description=Accounting webapp' - 'com.example.department=Finance' - 'com.example.label-with-empty-value' memswap_limit: -1 networks: foo: aliases: - baz bar: aliases: - baz ports: - target: 80 host_ip: 127.0.0.1 published: 8080 protocol: tcp - target: 80 host_ip: 127.0.0.1 published: 8000-9000 protocol: tcp secrets: - source: server-certificate target: server.cert uid: '103' gid: '103' mode: 0440 sysctls: - net.core.somaxconn=1024 - net.ipv4.tcp_syncookies=0 tmpfs: - /run - /tmp volumes: - bar - /baz:/baz baz: image: baz networks: foo: bar: volumes: foo: secrets: server-certificate: file: ./server.cert