summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile43
1 files changed, 43 insertions, 0 deletions
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