I have demonstrated to use Ansible to deploy WordPress (https://tungle.ca/?p=1252). However, it is more efficient to use Docker compose to deploy WordPress.
+ Download the Latest Docker Version.
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
+ Change file permission & check docker version.
chmod +x /usr/local/bin/docker-compose
docker–compose --version
+ Create a sample docker-compose.yml file.
Use the following link as a reference to create the docker-compose file.
https://docs.docker.com/samples/wordpress/
Port forwarding the destination port 5547 on the docker node to port 80 on a docker container.
Limit 2GB memory for running WordPress.
+ Deploy WordPress by using Docker compose.
docker-compose up -d
Check a TCP port 5547 is running on the docker node.
Access to WordPress.