From 9c3d5c48694db1018d50aa85acad434f47e5ed0b Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 13 Dec 2018 00:05:49 +0100 Subject: Initial import --- Makefile | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..60e89bb --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ +# It seems start/stop does not respect '-p' option. We either need to avoid using it or skip -p + +.PHONY: run cpu start stop rebuild rebuild-cpu bootstrap volumes attach bash clean + +run: + docker-compose -p biomedisa up + +cpu: + docker-compose -p biomedisa -f docker-compose.yml -f docker-compose.cpu.yml up + +start: + docker-compose -p biomedisa up -d +# docker-compose -p biomedisa up --no-start +# docker-compose -p biomedisa start + +stop: + docker-compose -p biomedisa down +# docker-compose -p biomedisa stop + +rebuild: + docker-compose -p biomedisa build + +rebuild-cpu: + docker-compose -p biomedisa -f docker-compose.yml -f docker-compose.cpu.yml build + +bootstrap: + docker-compose -p biomedisa run --rm django /run-bootstrap.sh + +#volumes: +# for name in /var/lib/docker/volumes/biomedisa_*; do ln -s $name/_data/ `basename $name | cut -d '_' -f 2`; done + +attach: + docker attach `docker ps | grep "biomedisa_biomedisa " | cut -f 1 -d ' '` + +bash: + docker exec -it `docker ps | grep "biomedisa_biomedisa " | cut -f 1 -d ' '` bash + +clean: stop + c=`docker ps -a | grep "biomedisa_mysql " | cut -f 1 -d ' '`; \ + if [ -n "$$c" ]; then docker rm -f "$$c"; fi + v=`docker volume ls | grep "biomedisa_mysql"`; \ + if [ -n "$$v" ]; then docker volume rm biomedisa_mysql; fi + make bootstrap -- cgit v1.2.3