This project provides a simple way to deploy WordPress with MariaDB using Docker containers, automated with Ansible.
- Make sure you have ansible already installed on your machine
- Make sure you don't have any troubles with your ec2 instance connection
- Edit the
inventory.ini
file to include your server ip address and ssh details - Edit the
roles/copy-files/vars/main.yml
with your desired database credentials (don't forget about ansible-vault!)
ansible-playbook -i inventory.ini deploy.yml
Once deployment is complete, access your WordPress site by visiting your server's ip address in a web browser (using http port(80)).
Check if containers are running:
cd /opt/wordpress && docker-compose ps
View logs:
cd /opt/wordpress && docker-compose logs <container_name>
Verify the environment variables:
cat /opt/wordpress/.env