In this section, we will learn about other Docker Swarm objects that will help us to fully deploy applications within the cluster.
We've already learned how to configure applications using environment variables. This is not recommended for production because anyone with system Docker access can read their values. To avoid this situation, we will use external data sources. We also learned how to integrate host resources inside containers. We can set configurations and passwords in files shared between hosts and containers. This will work on standalone environments but not for distributed workloads, where containers can run on different hosts. We will need to sync those files on all cluster nodes.
To avoid syncing files on multiple nodes, Docker Swarm provides two different objects for managing them. We can have private files or secrets and configurations. Both objects store their values in the Swarm key-value store...