Learn how to manage secrets in Docker Swarm services.
Cloning the Guide Assets Repository
docker-swarm-with-agent
sub-directory, which we’ll use as our working directory.Setting Up Authentication with Infisical
Entering Universal Auth Credentials
client-id
and client-secret
text files, respectively.Configuring the Infisical Agent
polling-interval
to control the frequency of secret updates.In the example template, the secrets are rendered as an HTML page, which will be set as Nginx’s home page to demonstrate successful secret retrieval and utilization./run/secrets/
because the contents of those files reside in a Docker secret.Creating the Docker Compose File
infisical-agent
and nginx
services in your Docker Compose file. infisical-agent
will handle secret retrieval and storage. These secrets are stored in a volume, accessible by other services like Nginx.Initializing Docker Swarm
Deploying the Docker Stack
Verifying Secret Consumption
http://localhost
. You should see the Infisical secrets displayed on the Nginx landing page.Clean up
polling-interval
set in agent config.