Permalink
Browse files

Use a Secondary Compose File

Rather than forcing phpMyAdmin to run every time we stand up the system, move that config out to a secondary compose file for selective instantiation. While we're at it, bring in phpMyAdmin for fun because that helps keep track of data in the cache as well.

Props @cmmarslender
  • Loading branch information...
Eric Mann
Eric Mann committed Mar 1, 2018
1 parent 5c83f06 commit 9c9b7bc0796d68f49a80a9c0db541007fc289cd4
Showing with 40 additions and 16 deletions.
  1. +23 −0 admin-compose.yml
  2. +0 −15 docker-compose.yml
  3. +17 −1 readme.md
View
@@ -0,0 +1,23 @@
version: '3'
services:
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
- PMA_HOST mysql
links:
- mysql:db
ports:
- 8092:80
depends_on:
- mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: password
phpmemcacheadmin:
image: hitwe/phpmemcachedadmin
ports:
- "8093:80"
depends_on:
- memcached
View
@@ -68,18 +68,3 @@ services:
volumes:
- "./config/wpsnapshots:/wpsnapshots"
- "./wordpress:/var/www/html"
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
- PMA_HOST mysql
links:
- mysql:db
ports:
- 8092:80
depends_on:
- mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: password
View
@@ -39,10 +39,26 @@ Host: mysql
Default Elasticsearch connection information (from within PHP-FPM container):
```Host: http://elasticsearch:9200```
```
Host: http://elasticsearch:9200
```
The Elasticsearch container is configured for a maximum heap size of 750MB to prevent out of memory crashes when using the default 2GB memory limit enforced by Docker for Mac and Docker for Windows installations or for Linux installations limited to less than 2GB. If you require additional memory for Elasticsearch override the value in a `docker-compose.override.yml` file as described below.
## Administrative Tools
We've bundled a simple administrative override file to aid in local development where appropriate. This file introduces both [phpMyAdmin](https://www.phpmyadmin.net/) and [phpMemcachedAdmin](https://github.com/elijaa/phpmemcachedadmin) to the Docker network for local administration of the database and object cache, respectively.
You can run this atop a standard Docker installation by specifying _both_ the standard and the override configuration when initializing the service:
```
docker-compose -f docker-compose.yml -f admin-compose.yml up
```
The database tools can be accessed [on port 8092](http://localhost:8092).
The cache tools can be accessed [on port 8093](http://localhost:8093).
## Docker Compose Overrides File
Adding a `docker-compose.override.yml` file alongside the `docker-compose.yml` file, with contents similar to

0 comments on commit 9c9b7bc

Please sign in to comment.