From 51b06ae8683ebf0218faaf1dd0c0d1c6e33f0e8a Mon Sep 17 00:00:00 2001 From: Kostas Drakontidis Date: Thu, 18 Jun 2026 18:59:55 +0300 Subject: [PATCH] upload makefile --- src/officesense_pi/Makefile | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/officesense_pi/Makefile diff --git a/src/officesense_pi/Makefile b/src/officesense_pi/Makefile new file mode 100644 index 0000000..49a64cf --- /dev/null +++ b/src/officesense_pi/Makefile @@ -0,0 +1,44 @@ +build: + docker build -t officesense:latest . + +run: + docker run --rm -it --init -p 80:80 \ + -e ADMIN_EMAIL=admin@officesense.com \ + -e ADMIN_PASSWORD=supersecret \ + -e ADMIN_COOKIE_SECRET=some-long-random-string \ + -e NODE_ENV=production \ + -e DATABASE_URL=file:/app/data/officesense.sqlite \ + --device /dev/video0:/dev/video0 \ + -v $(shell pwd)/data:/app/data \ + officesense:latest + +dev: + docker run --rm -it --init -p 80:80 \ + -v $(shell pwd):/app \ + -w /app \ + -e ADMIN_EMAIL=admin@officesense.com \ + -e ADMIN_PASSWORD=supersecret \ + -e ADMIN_COOKIE_SECRET=some-long-random-string \ + -e NODE_ENV=development \ + --device /dev/video0:/dev/video0 \ + node:24-slim \ + bash -c "apt-get update && apt-get install -y libdlib19.1 libjpeg62-turbo libblas3 libopenblas0 libatlas3-base liblapack3 && node --run dev" + +migrate: + docker run --rm \ + -e DATABASE_URL=file:/app/data/officesense.sqlite \ + -v $(shell pwd)/data:/app/data \ + officesense:latest \ + npx prisma migrate deploy + +sh: + docker run --rm -it -v $(shell pwd):/app -w /app node:24-slim sh + +format: + docker run --rm -it --init \ + -v $(shell pwd):/app \ + -w /app \ + node:24-slim \ + bash -c "node --run format" + +.PHONY: build run dev migrate sh format \ No newline at end of file