services: test: cap_add: - NET_ADMIN cap_drop: - ALL command: ["nginx", "updated", "command"] cpus: 0.5 entrypoint: ["/updated-docker-entrypoint.sh"] environment: BOOL: "true" EMPTY: "" VAR: value image: nginx:latest init: true logging: driver: json-file options: max-size: 10m max-file: 3 mem_limit: 100M mem_reservation: 50M privileged: true pull_policy: always scale: 3 user: nginx:nginx volumes: - /etc/passwd:/host/etc/passwd:ro - data1:/data1 - type: volume source: data2-alias target: /data2/long/syntax - data-external:/external:ro - type: tmpfs target: /tmpfs tmpfs: size: 10485760 x-ports: - test.example.com:80/https - 8000/http - 5000:3000@host test-caddy-config: image: myapp:1.2.3 # x-ports and x-caddy are mutually exclusive. x-caddy: | test-caddy-config.example.com { reverse_proxy {{ upstreams 80 }} } volumes: data1: data2-alias: name: data2 driver: local data-external: external: true