comparison service/environment/makefile @ 440:6304b0370491

environment graph service standardization Ignore-this: 3aeb86c03902af984a871c9c2d2dd7cd
author drewp@bigasterisk.com
date Thu, 18 Apr 2019 09:12:26 -0700
parents
children
comparison
equal deleted inserted replaced
439:124c921ad52d 440:6304b0370491
1 JOB=environment
2 PORT=9075
3
4 TAG=bang6:5000/${JOB}_x86:latest
5
6 build_image:
7 rm -rf tmp_ctx
8 mkdir -p tmp_ctx
9 cp -a Dockerfile ../../lib/*.py ../../lib/twisted_sse_demo *.n3 *.html *.py req* tmp_ctx
10 docker build --network=host -t ${TAG} tmp_ctx
11 docker push ${TAG}
12 rm -r tmp_ctx
13
14 shell:
15 docker run --rm -it --cap-add SYS_PTRACE --net=host ${TAG} /bin/bash
16
17 local_run: build_image
18 docker run --rm -it -p ${PORT}:${PORT} \
19 -v `pwd`:/mnt \
20 -v /my/proj/rdfdb/rdfdb:/usr/local/lib/python2.7/dist-packages/rdfdb \
21 --net=host \
22 ${TAG} \
23 python environment.py -v
24
25 local_run_strace: build_image
26 docker run --rm -it -p ${PORT}:${PORT} \
27 -v `pwd`:/mnt \
28 --net=host \
29 --cap-add SYS_PTRACE \
30 ${TAG} \
31 strace -f -tts 200 python environment.py -v
32
33 local_run_pyspy: build_image
34 docker run --rm -it -p ${PORT}:${PORT} \
35 -v `pwd`:/mnt \
36 --net=host \
37 --cap-add SYS_PTRACE \
38 ${TAG} \
39 py-spy -- python environment.py
40
41
42 redeploy: build_image
43 supervisorctl restart $(JOB)_$(PORT)
44