How to do it...

Once we are logged in to one of the manager nodes, the first thing we need to do is create some Swarm secrets for our database passwords:

$ echo "DbP@SSwod1" | docker secret create root_db_password -$ echo "myJ000mlaPw" | docker secret create jm_db_password -

Let's confirm that we added them correctly:

$ docker secret ls

They look good. Let's create a custom overlay network so that our services can talk with each other over an encrypted connection on the cluster:

$ docker network create -d overlay joomla$ docker network ls

Get Docker Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.