Skip to content

Merging Swarm and Compose Files #231

Closed Answered by BretFisher
KBaur asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think you need to force yourself into a single file. The vary nature of their being a Build section that Swarm will ignore, and a Deploy section that Compose ignores, means the two environments won't be identical.
I do see people starting with a single file, but in many cases, they evolve into separate files for various reasons. I don't think there's a one-design-fits-all approach.

I personally don't use the same yaml file for Compose + Swarm anymore because Swarm is stuck on version 3.9 and Compose now uses "Compose Spec" for a versionless file... Giving Compose a lot more features than Swarm now for local development in that YAML file.

I wrote about some 2023 compose.yaml featur…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by KBaur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants