Mercurial > code > home > repos > homeauto
annotate service/tinyScreen/makefile @ 1745:d90cb7c06f15
try to crash if mqtt doesn't connect
author | drewp@bigasterisk.com |
---|---|
date | Thu, 09 Nov 2023 17:21:59 -0800 |
parents | a471688fb7b7 |
children |
rev | line source |
---|---|
388
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
1 JOB=tiny_screen |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
2 PORT=10013 |
459
a471688fb7b7
build updates. turn off output speed override for now
drewp@bigasterisk.com
parents:
393
diff
changeset
|
3 RUNHOST=frontdoor |
388
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
4 |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
5 TAG=bang6:5000/${JOB}_x86:latest |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
6 TAG_PI=bang6:5000/${JOB}_pi:latest |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
7 |
459
a471688fb7b7
build updates. turn off output speed override for now
drewp@bigasterisk.com
parents:
393
diff
changeset
|
8 push_x86: build_x86 |
388
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
9 docker push ${TAG} |
459
a471688fb7b7
build updates. turn off output speed override for now
drewp@bigasterisk.com
parents:
393
diff
changeset
|
10 push_pi: build_pi |
393
5fc79536885a
fix screen timing corruption, hopefully. add py client
drewp@bigasterisk.com
parents:
388
diff
changeset
|
11 docker push ${TAG_PI} |
388
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
12 |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
13 build_x86: |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
14 rm -rf tmp_ctx |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
15 mkdir -p tmp_ctx |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
16 cp -a Dockerfile ../../lib/*.py *.py *.txt *.html anim font tmp_ctx |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
17 docker build --network=host -t ${TAG} tmp_ctx |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
18 |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
19 build_pi: |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
20 rm -rf tmp_ctx |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
21 mkdir -p tmp_ctx |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
22 cp -a Dockerfile.pi ../../lib/*.py *.py *.txt *.html anim font tmp_ctx |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
23 docker build -f Dockerfile.pi --network=host -t ${TAG_PI} tmp_ctx |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
24 |
393
5fc79536885a
fix screen timing corruption, hopefully. add py client
drewp@bigasterisk.com
parents:
388
diff
changeset
|
25 build_image_pi: build_pi push_pi |
388
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
26 |
459
a471688fb7b7
build updates. turn off output speed override for now
drewp@bigasterisk.com
parents:
393
diff
changeset
|
27 shell: build_x86 |
a471688fb7b7
build updates. turn off output speed override for now
drewp@bigasterisk.com
parents:
393
diff
changeset
|
28 docker run --rm -it --name=$(JOB)_shell --cap-add SYS_PTRACE --net=host $(TAG) /bin/sh |
388
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
29 |
c146fa2bc7d4
tinyscreen can flip images and render news
drewp@bigasterisk.com
parents:
diff
changeset
|
30 local_run: build_x86 |
459
a471688fb7b7
build updates. turn off output speed override for now
drewp@bigasterisk.com
parents:
393
diff
changeset
|
31 docker run --rm -it --net=host --name=$(JOB)_local -e DISPLAY=$(DISPLAY) -e HOME=$(HOME) -v $(HOME):$(HOME) -v /tmp/.X11-unix:/tmp/.X11-unix -v `pwd`/index.html:/opt/index.html bang6:5000/tiny_screen_x86:latest python ./tiny_screen.py -v -x |
393
5fc79536885a
fix screen timing corruption, hopefully. add py client
drewp@bigasterisk.com
parents:
388
diff
changeset
|
32 |
5fc79536885a
fix screen timing corruption, hopefully. add py client
drewp@bigasterisk.com
parents:
388
diff
changeset
|
33 # try pi kernel 20181112-1 |
459
a471688fb7b7
build updates. turn off output speed override for now
drewp@bigasterisk.com
parents:
393
diff
changeset
|
34 fresh_sudo: |
a471688fb7b7
build updates. turn off output speed override for now
drewp@bigasterisk.com
parents:
393
diff
changeset
|
35 sudo -v |
a471688fb7b7
build updates. turn off output speed override for now
drewp@bigasterisk.com
parents:
393
diff
changeset
|
36 redeploy: fresh_sudo push_pi |
a471688fb7b7
build updates. turn off output speed override for now
drewp@bigasterisk.com
parents:
393
diff
changeset
|
37 sudo /my/proj/ansible/playbook -l $(RUNHOST) -t tiny_screen |
a471688fb7b7
build updates. turn off output speed override for now
drewp@bigasterisk.com
parents:
393
diff
changeset
|
38 supervisorctl -s http://$(RUNHOST):9001/ restart $(JOB)_$(PORT) |