Skip to content

Instantly share code, notes, and snippets.

@boutros
Last active August 29, 2015 14:09
Show Gist options
  • Save boutros/4e8de8b9b0c0e04f2812 to your computer and use it in GitHub Desktop.
Save boutros/4e8de8b9b0c0e04f2812 to your computer and use it in GitHub Desktop.
wp-review-publish development setup
all: start
git:
if [ ! -d "wp-review-publish" ]; then \
git clone https://github.com/digibib/wp-review-publish ;\
fi
build: git
docker inspect wp-mysql > /dev/null 2>&1;\
if [ $$? -eq 1 ] ; then \
docker run --name wp-mysql -e MYSQL_ROOT_PASSWORD=xyz -d mysql ;\
fi
docker inspect wp-deichman > /dev/null 2>&1;\
if [ $$? -eq 1 ] ; then \
docker run --name wp-deichman -v $(shell pwd)/wp-review-publish:/var/www/html/wp-content/plugins/wp-review-publish --link wp-mysql:mysql -p 8080:80 -d wordpress ;\
docker exec wp-deichman rm /var/www/html/index.html ;\
fi
start: build
docker start wp-mysql
docker start wp-deichman
stop:
docker stop wp-deichman wp-mysql
rm: stop
docker rm wp-deichman wp-mysql
.PHONY: build start stop rm
@boutros
Copy link
Author

boutros commented Nov 10, 2014

Dependencies: git, make, docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment