summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-12-13 00:05:49 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-12-13 00:05:49 +0100
commit9c3d5c48694db1018d50aa85acad434f47e5ed0b (patch)
treebee24b887c12d1abaa4d942525a6c1d304dd200d /Makefile
downloadbiomedisa-9c3d5c48694db1018d50aa85acad434f47e5ed0b.tar.gz
biomedisa-9c3d5c48694db1018d50aa85acad434f47e5ed0b.tar.bz2
biomedisa-9c3d5c48694db1018d50aa85acad434f47e5ed0b.tar.xz
biomedisa-9c3d5c48694db1018d50aa85acad434f47e5ed0b.zip
Initial import
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