compose-cli icon indicating copy to clipboard operation
compose-cli copied to clipboard

ecs-compose-features and ecs-compose-examples, inconsistencies in how logging configuration is described

Open craig-osterhout opened this issue 3 years ago • 2 comments

From: https://github.com/docker/docker.github.io/issues/14589 File:

  • https://github.com/docker/compose-cli/blob/main/docs/ecs-compose-features.md
  • https://github.com/docker/compose-cli/blob/main/docs/ecs-compose-examples.md

Problem: There are inconsistencies in how logging configuration is described. I'm not sure which is correct or I'd fix it myself.

File: cloud/ecs-compose-features.md URL: https://docs.docker.com/cloud/ecs-compose-features/#logs

The page states:

CloudWatch can be customized by setting service logging.driver_opts by passing

But the code block uses driver-opts instead of driver_opts:

test:
    image: mycompany/webapp
    logging:
      driver-opts:
        awslogs-datetime-pattern: "some-pattern"

File: cloud/ecs-compose-examples.md URL: https://docs.docker.com/cloud/ecs-compose-examples/#service

In the Service -> Logging section, logging is configured via an options object instead of driver_opts:

services:
  foo:
    image: nginx
    logging:
      options:
        awslogs-datetime-pattern: "FOO"

URL: https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json

And finally, the json-spec shows support for an options object for logging. It does not appear to support driver_opts.

"logging": {
 "type": "object",
 "properties": {
   "driver": {"type": "string"},
   "options": {
     "type": "object",
     "patternProperties": {
       "^.+$": {"type": ["string", "number", "null"]}
     }
   }
 },
 "additionalProperties": false,
 "patternProperties": {"^x-": {}}
},

craig-osterhout avatar May 24 '22 23:05 craig-osterhout

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 08 '23 04:01 stale[bot]

This issue has been automatically closed because it had not recent activity during the stale period.

stale[bot] avatar Jun 18 '23 19:06 stale[bot]