From ba3ba561ef48c301ba8cf41c3a8070bfe8f736d1 Mon Sep 17 00:00:00 2001
From: Werner Robitza <werner.robitza@gmail.com>
Date: Sun, 7 Apr 2019 12:19:45 +0200
Subject: [PATCH] add phpMyAdmin

This adds a default phpMyAdmin installation for easier debugging.
---
 README.md          | 12 ++++++++++++
 docker-compose.yml | 11 +++++++++++
 2 files changed, 23 insertions(+)

diff --git a/README.md b/README.md
index e3d4211..4dd7fe5 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,12 @@
 
 Easy WordPress development with Docker and Docker Compose.
 
+With this project you can quickly run the following:
+
+- [WordPress and WP CLI](https://hub.docker.com/_/wordpress/)
+- [phpMyAdmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)
+- [MySQL](https://hub.docker.com/_/mysql/)
+
 Contents:
 
 - [Requirements](#requirements)
@@ -139,3 +145,9 @@ This way you can use the CLI command above as follows:
 ```
 wp plugin list
 ```
+
+### phpMyAdmin
+
+You can also visit `http://127.0.0.1:8080` to access phpMyAdmin after starting the containers.
+
+The default username is `root`, and the password is the same as supplied in the `.env` file.
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index 176857e..2296edd 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -27,6 +27,17 @@ services:
       - db
       - wp
 
+  pma:
+    image: phpmyadmin/phpmyadmin
+    environment:
+      PMA_HOST: db
+      PMA_PORT: 3306
+      MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
+    ports:
+      - ${IP}:8080:80
+    links:
+      - db:db
+
   db:
     image: mysql:latest # https://hub.docker.com/_/mysql/ - or mariadb https://hub.docker.com/_/mariadb
     ports:
-- 
GitLab