Allow custom labels to be configured for Dockerized Services #1247
Labels
in: module
An issue/pull request releated to one of the internal modules
t: feature request
A request of a feature someone wants to see in a future release.
v: 4.X
This pull should be included in the 4.0 release
Describe the new feature
Adding a new configuration option to the Dockerized-Services config.json file would allow administrators to assign custom labels to Docker containers that are created when the service starts.
Why do you need this feature?
Using custom labels for Dockerized services will make it easier to work with containers using 3rd party tools and automate tasks that CloudNet is not yet capable of, such as automatically updating the used Docker image for a service environment using containrrr/watchtower, which behavior can be controlled by adding a label to the running container.
Alternatives
Setting the label before starting the container
Or see label options in Docker object labels | Docker Documentation.
Setting up a label by building a Docker image
This solution cannot be considered sufficient as it causes unnecessary load on the server resources and cannot be linked with automatic tasks managed by 3rd party tools (the build would have to be done by cron with time offset against 3rd party tasks).
Configure containrrr/watchtower to prevent automatic restart of containers after they are updated
While this solution is possible, it creates problems for other services that run on the same Docker instance and do not support automated container restart options, such as CloudNet via its REST API. This setup would require manually accessing the server and restarting the containers after each image update.
Do nothing and let the third party tool handle its thing
However, the optimistically best option has its flaws, which is why this feature request exists. Automatically restarting containers will break the connection between the CloudNet service and the network listener, automatically deploying the new CloudNet service while restarting the existing container. This results in duplicate services running, increased server resource utilization, and possible data corruption.
Other
No response
Issue uniqueness
The text was updated successfully, but these errors were encountered: