view service/reasoning/makefile @ 1288:f4ce7989d25c

mockup of thermostat rules Ignore-this: 61a460ac3bdcbc0c4c6de2a2afcc6d5c darcs-hash:66578b12e414cfaf1c1bc1b93523e90d5dd1be0d
author drewp <drewp@bigasterisk.com>
date Sun, 21 Apr 2019 00:06:12 -0700
parents ee5698ef64dd
children
line wrap: on
line source

JOB=reasoning
PORT=9071

TAG=bang6:5000/${JOB}_x86:latest

build_image:
	rm -rf tmp_ctx
	mkdir -p tmp_ctx
	cp -a Dockerfile ../../lib/*.py ../../lib/twisted_sse_demo *.py *.n3 *.html input req* tmp_ctx
	rsync -a input 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: build_image
	docker run --rm -it -p ${PORT}:${PORT} \
          -v `pwd`:/mnt \
          --net=host \
          ${TAG} \
          python /mnt/${JOB}.py -iro

redeploy: build_image
	supervisorctl restart $(JOB)_$(PORT)