Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Commit

Permalink
Merge pull request #4 from cmmarslender/feature/elasticpress
Browse files Browse the repository at this point in the history
Feature/elasticpress
  • Loading branch information
cmmarslender committed Feb 9, 2017
2 parents 52a53c0 + a8164d4 commit 4e443ff
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -34,4 +34,5 @@ config.codekit
!/data/.gitkeep
docker-compose.override.yml

notes.md
notes.md
/config/elasticsearch/plugins/*
Empty file.
7 changes: 5 additions & 2 deletions docker-compose.yml
Expand Up @@ -16,21 +16,24 @@ services:
image: memcached:latest
restart: always
elasticsearch:
image: elasticsearch:2
image: elasticsearch:5
restart: always
ports:
- "9200:9200"
volumes:
- "./config/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml"
- "./config/elasticsearch/plugins:/usr/share/elasticsearch/plugins"
phpfpm:
depends_on:
- mysql
- memcached
- elasticsearch
image: johnpbloch/phpfpm:7.0
volumes:
- "./wordpress:/var/www/html"
- "./config/php-fpm/php.ini:/usr/local/etc/php/php.ini"
- "./config/php-fpm/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
restart: always
build: ./dockerfiles/php-fpm
extra_hosts:
- "docker-local.dev:172.18.0.1"
nginx:
Expand Down
11 changes: 11 additions & 0 deletions dockerfiles/php-fpm/Dockerfile
@@ -0,0 +1,11 @@
FROM johnpbloch/phpfpm:7.0

RUN curl -L https://phar.phpunit.de/phpunit.phar > /tmp/phpunit.phar \
&& chmod +x /tmp/phpunit.phar \
&& mv /tmp/phpunit.phar /usr/local/bin/phpunit

RUN apt-get install -y git subversion wget

CMD ["php-fpm"]

EXPOSE 9000
5 changes: 2 additions & 3 deletions readme.md
Expand Up @@ -4,10 +4,9 @@
1. `git clone git@github.com:cmmarslender/docker-template.git <my-project-name>`
1. `cd <my-project-name>`
1. `docker-compose up`
1. Run `bash setup.sh` to download WordPress and create a `wp-config.php` file.

The `wordpress` folder is configured as the webroot by default. Download WordPress and anything else you need here.

## Overrides File
## Docker Compose Overrides File

I typically add a `docker-compose.override.yml` file alongside the docker-compose.yml file, with contents similar to
the following to change the domain associated with the cluster while retaining ability to pull in changes from the repo.
Expand Down
2 changes: 1 addition & 1 deletion setup.sh
Expand Up @@ -6,5 +6,5 @@ then
else
echo "WordPress config file not found. Installing..."
docker-compose exec --user www-data phpfpm wp core download
docker-compose exec --user www-data phpfpm wp core config --dbhost=mysql --dbname=wordpress --dbuser=wordpress --dbpass=password
docker-compose exec --user www-data phpfpm wp core config --dbhost=mysql --dbname=wordpress --dbuser=root --dbpass=password
fi

0 comments on commit 4e443ff

Please sign in to comment.