# WordPress Docker Setup This repository provides a Dockerized environment for running WordPress locally using Docker Compose. It's designed for quick development and testing without complex installations. ## Architecture - **Apache Server**: Single Apache container with `mod_userdir` enabled - **User Data**: Shared volume containing student org home directories - **WordPress**: Separate WordPress + MariaDB containers for testing - **Structure**: Each org has `/home//public_html/` served at `http://localhost:8080/~` ## 🚀 Quick Start 1. **Clone the repository:** ```bash git clone https://git.1337.berkeley.edu/Committee/Secure-OCF-Web-Hosting.git cd Secure-OCF-Web-Hosting/WordPress-Docker ``` 2. **Install Docker Desktop:** - [macOS](https://docs.docker.com/desktop/setup/install/mac-install/) - [Windows](https://docs.docker.com/desktop/setup/install/windows-install/) 3. **Build and start the containers:** ```bash docker-compose up -d ``` 4. **Access WordPress:** Open your browser and navigate to: ``` http://localhost:8081 ``` Follow the on-screen instructions to complete the WordPress setup. ### Access sites: - **Student org sites**: - http://localhost:8080/~studentorg1 - http://localhost:8080/~studentorg2 - http://localhost:8080/~studentorg3 - **WordPress**: http://localhost:8081 ### Add new student org: ```bash docker exec -it ocf_apache_server bash mkdir -p /home/neworg/public_html echo "

New Org

" > /home/neworg/public_html/index.html chown -R www-data:www-data /home/neworg ``` ### View Apache logs: ```bash docker logs ocf_apache_server ``` ## ⚙️ Managing Containers * **Start containers:** ```bash docker-compose start ``` * **Stop containers:** ```bash docker-compose stop ``` * **Stop and remove containers:** ```bash docker-compose down ``` Add the `-v` flag to also remove volumes: ```bash docker-compose down -v ``` ## 🔐 Accessing phpMyAdmin If phpMyAdmin is included in your setup: * Open your browser and navigate to: ``` http://localhost:8081 ```