If you want to be able to manage your container lifecycle without Swarm due to network instability, perhaps what you’re doing is the best method–I’d just never thought of trying to use Swarm only for the setup/maintenance of overlay networks. There certainly isn’t anything stopping you from adding overlay networks with --attachable
for letting stand-alone containers connect and function. That said, you could still add the option to be able to deploy services via Swarm through the use of node labels and the deploy:
configuration option and placement constraints. The variable I’m unsure of is what level of control you’d have without a functioning Swarm manager node; after all, that is the point of the “orchestration”… Having those aspects in your compose files shouldn’t affect stand-alone Docker Compose use though (deploy:
is ignored with docker-compose
, for example) and might make for easier multi-node simulation of your system in a dev cluster.