compose-spec / compose-spec

The Compose specification

Home Page:https://compose-spec.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document supported compose features for swarm and non-swarm

stavros-k opened this issue · comments

What is the problem you're trying to solve
A clear and concise description of what the problem is.

Currently the docs do not clearly state which features are available in non-swarm mode, or in swarm mode.
There are some references but are very sparse.

Describe the solution you'd like
A clear and concise description of what you'd like to happen.

Docs should have tags/labels/badges that indicate that X feature is supported in swarm only or in any case.

Additional context
Add any other context about the feature request here.

I was reading the docs and I was "skipping" the deploy section as I thought that it was swarm only feature, but turns out that this is where you define cpu limitations, gpu's etc in any mode.
Though is not still clear in the docs that his is the case.

Additionally a label of "available since X version" would be also welcome.

swarm does not use the compose specification (see docker/cli#2527), so there's no reason it would be listed here for (un)supported features.

Also, this specification was designed to be implementation agnostic. Still I fully agree it would be nice features are tagged with required Docker Compose version, but this can't happed within this repository, would need to be declared inside docker compose docs. On the other hand, Docker Compose being the reference implementation, some reference would still make sense ...

Docker docs include some notes on the version require to use some recent feature (see for example https://docs.docker.com/compose/compose-file/08-configs/)

swarm does not use the compose specification (see docker/cli#2527), so there's no reason it would be listed here for (un)supported features.

Interesting, coming from k8s world, when I saw things like replicas under deploy, I automatically assumed that was for swarm. Thanks for the heads up!

This indeed comes from swarm, as compose file v3 was introduced to support clustering mode - Docker Compose used scale attribute for this purpose. Compose Spec came later to reconcile compose file formats v2 and v3, but unfortunately swarm didn't yet adopted it