Deploying WordPress on Docker for AWS
Now that we have an active Docker for AWS installation set up, let's deploy an application to see how it works. In this recipe, we will be installing WordPress on top of Docker for AWS.
Getting ready
Before we proceed, you will need to make sure that you have satisfied all of the prerequisites:
- You will need to have your Docker for AWS stack from the previous recipe up and running.
- SSH into one of the manager nodes. Instructions on how to do this are also available in the previous recipe.
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 "myDbP@SSwods" | docker secret create root_db_password - $ echo "myWpressPw" | docker secret create wp_db_password -

We also need to create an overlay network so that our services can talk with each other:
$ docker network create -d overlay wp

Let's create the MariaDB database service that WordPress is going to use;...