A clean, production-style setup for running WordPress and MySQL using Docker Compose.
- Two-tier containerized stack (WordPress + MySQL)
- Persistent data with Docker volumes
- Secure configuration using environment variables
- Healthcheck for database service
- Auto-restart and network isolation
-
Clone the repo
git clone https://github.com/younesmod/docker-compose-wordpress.git cd docker-compose-wordpress -
Create .envfile
cp .env.example .env # edit your credentials inside .env -
Run the stack
docker-compose up -d
-
Access the site
- WordPress: http://localhost:8080
docker-compose down -v