docker-archive / compose-cli

Easily run your Compose application to the cloud with compose-cli
Apache License 2.0
958 stars 254 forks source link

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

Open craig-osterhout opened 2 years ago

craig-osterhout commented 2 years ago

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

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-": {}}
},
stale[bot] commented 1 year ago

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] commented 1 year ago

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