# Docker Auto Labels [](https://pypi.python.org/pypi/auto-docker-labels)
Automatically generate Docker Swarm mode node labels for each constraint label in each service in a Docker Compose / Docker Stack file.
## Description
This command line package is made to be used with a Docker Swarm mode cluster.
It will: * Read a Docker Compose / Docker Stack file. * Extract the node label constraints for each service. * Check that all the labels exist in the Docker Swarm mode cluster. * For each label that doesn’t exist, create it in a random node in the cluster.
Adding label constraints helps you ensure that all the “stateful” Docker services (like databases) are always deployed to the same node (specially useful in a multi-node cluster).
This program will ensure that those labels exist in one node in the cluster, if they don’t exist, they are created in one node chosen randomly.
That way, the first time you deploy a stack, a random node will be assigned to each stateful service (by this command, right before the deployment).
And for all subsequent deployments, the stateful services will go to the same nodes that they were using.
For examples on how to use it, check: https://github.com/khulnasoft/full-stack
## Release Notes
### Latest Changes
#### Internal
🔧 Add GitHub templates for discussions and issues, and security policy. PR [#9](https://github.com/khulnasoft/auto-docker-labels/pull/9) by [@alejsdev](https://github.com/alejsdev).
🔧 Add funding. PR [#8](https://github.com/khulnasoft/auto-docker-labels/pull/8) by [@khulnasoft](https://github.com/khulnasoft).
👷 Add latest-changes GitHub Action. PR [#6](https://github.com/khulnasoft/auto-docker-labels/pull/6) by [@khulnasoft](https://github.com/khulnasoft).
👷 Add dependabot. PR [#7](https://github.com/khulnasoft/auto-docker-labels/pull/7) by [@khulnasoft](https://github.com/khulnasoft).
### 0.2.3
## License
MIT License
History
0.1.0 (2018-05-01)
First release on PyPI.
Metadata
Release files for auto-docker-labels 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| auto_docker_labels-0.2.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for auto_docker_labels-0.2.3-py2.py3-none-any.whl |
Release files / auto_docker_labels-0.2.3-py2.py3-none-any.whl
| Download URL | auto_docker_labels-0.2.3-py2.py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e6b88f76f6bdd07de0f41032edc53d51396d95db9ce79457876cec2c099bf283
|
|
BLAKE2b-256 checksum How to use checksums |
3c80a91a108ccbfedb94dfeb655c4e7fd1778a2de40a1ecaf07af758313260e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for auto-docker-labels 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.