This repository has been archived on 2026-09-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2025-10-07 18:07:58 -07:00

2.1 KiB

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/<orgname>/public_html/ served at http://localhost:8080/~<orgname>

🚀 Quick Start

  1. Clone the repository:

    git clone https://git.1337.berkeley.edu/Committee/Secure-OCF-Web-Hosting.git
    cd Secure-OCF-Web-Hosting/WordPress-Docker
    
  2. Install Docker Desktop:

  3. Build and start the containers:

    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:

Add new student org:

docker exec -it ocf_apache_server bash
mkdir -p /home/neworg/public_html
echo "<h1>New Org</h1>" > /home/neworg/public_html/index.html
chown -R www-data:www-data /home/neworg

View Apache logs:

docker logs ocf_apache_server

⚙️ Managing Containers

  • Start containers:

    docker-compose start
    
  • Stop containers:

    docker-compose stop
    
  • Stop and remove containers:

    docker-compose down
    

    Add the -v flag to also remove volumes:

    docker-compose down -v
    

🔐 Accessing phpMyAdmin

If phpMyAdmin is included in your setup:

  • Open your browser and navigate to:

    http://localhost:8081