diff --git a/README.md b/README.md index bdf2454..0f8d758 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,67 @@ -# ansible-wordpress-host-init +# Ansible-WordPress-Nginx-Docker +This Ansible project automates the setup and configuration of an Ubuntu machine to host a WordPress website using Nginx, PHP, Docker, MySQL, and Redis. + +## Features + +The Ansible playbook in this project will: + +1. Update Ubuntu packages +2. Install Nginx +3. Configure Nginx +4. Install PHP +5. Configure PHP +6. Install WordPress +7. Install Docker +8. Deploy MySQL and Redis containers + +## Prerequisites + +- Ansible (version 2.9+) +- Ubuntu 18.04+ target machine +- SSH access to the target machine + +## Getting Started + +Clone this repository to your local machine: + +```bash +git clone https://github.com/your-username/ansible-wordpress-nginx-docker.git +cd ansible-wordpress-nginx-docker +``` + +Update the `inventory/target.ini` file with the correct information for your target Ubuntu machine: + +```ini +[main] +your-server-ip ansible_ssh_user=your-username ansible_ssh_port=port ansible_ssh_private_key_file=path/to/your/private/key +``` + +Run the playbook: + +```bash +ansible-playbook -i inventory/target.ini setup_server.yml +``` + +After the playbook has run successfully, you should have a fully functional WordPress website running on your Ubuntu machine with Nginx, PHP, MySQL, and Redis. + +## Variables + +The following variables can be customized in the `vars/external.yml` file: + +```yaml +php_version: PHPversion +vhost_name: name of the vhost +domain: thedomain.com +mysql_mem_limit: 1024 //MB +mysql_mem_reserve: 512 //MB +mysql_root_pass: evenmoresecurepwd +mysql_db: projectname +mysql_user: projectname +mysql_user_pass: verysecurepwd +redis_pass: ultimatepassword +``` + +Make sure to replace the default values with your own. + +```yaml diff --git a/vars/external.yml b/vars/external.yml index 814bb05..9c8f243 100644 --- a/vars/external.yml +++ b/vars/external.yml @@ -2,7 +2,6 @@ php_version: 8.1 vhost_name: projectwp domain: projectwp.com -db_pwd: 123456 mysql_mem_limit: 1024 mysql_mem_reserve: 512 mysql_root_pass: xyz