diff service/collector/makefile @ 1245:4c123099e5b6

collector build improvements; stats and logging Ignore-this: 22fbbb2cde6a6bdbd9d0017f1f157a41 darcs-hash:3bcbb4fa359c1165e1c900ce0264869567e1d1fa
author drewp <drewp@bigasterisk.com>
date Thu, 18 Apr 2019 09:15:39 -0700
parents b1aa28ea1fee
children ef7eba0551f2
line wrap: on
line diff
--- a/service/collector/makefile	Thu Apr 18 09:15:22 2019 -0700
+++ b/service/collector/makefile	Thu Apr 18 09:15:39 2019 -0700
@@ -9,22 +9,33 @@
 	cp -a Dockerfile ../../lib/*.py ../../lib/twisted_sse_demo *.py req* tmp_ctx
 	docker build --network=host -t ${TAG} tmp_ctx
 	docker push ${TAG}
-	rm -r tmp_ctx
 
 shell:
 	docker run --rm -it --cap-add SYS_PTRACE --net=host ${TAG} /bin/bash
 
-local_run:
+local_run: build_image
 	docker run --rm -it -p ${PORT}:${PORT} \
-          -v `pwd`:/mnt \
           --net=host \
           ${TAG} \
-          python /mnt/sse_collector.py -v
+          python sse_collector.py -v
 
-local_run_strace:
+local_run_strace: build_image
 	docker run --rm -it -p ${PORT}:${PORT} \
           -v `pwd`:/mnt \
           --net=host \
           --cap-add SYS_PTRACE \
           ${TAG} \
           strace -f -tts 200 python /mnt/sse_collector.py -v
+
+local_run_pyspy: build_image
+	docker run --rm -it -p ${PORT}:${PORT} \
+          -v `pwd`:/mnt \
+          --net=host \
+          --cap-add SYS_PTRACE \
+          ${TAG} \
+          py-spy -- python /mnt/sse_collector.py
+
+
+redeploy: build_image
+	supervisorctl restart sse_collector_9072
+