Files
Christian van Dijk 59ddc66a8e
All checks were successful
CI / Lint (push) Successful in 21s
CI / Helm Lint (push) Successful in 6s
CI / Build (push) Successful in 1m48s
CI / Test (push) Successful in 44s
🧱 add tests & ci changes
2026-02-23 22:52:54 +01:00

52 lines
989 B
Makefile

.PHONY: run test lint deps init-db dev build logs logs-worker logs-all down shell-postgres shell-api shell-worker status
# Docker Compose: use parent dir's compose file (when run via make -C devices-api)
COMPOSE := docker-compose -f ../docker-compose.yml
run:
lua app-standalone.lua
test:
lua run_tests.lua
lint:
luacheck . --codes
deps:
luarocks install lua-cjson luasocket pgmoon redis-lua luaossl
# Docker Compose targets (run from project root: make -C devices-api <target>)
init-db:
$(COMPOSE) exec postgres psql -U devices_user -d handheld_devices \
-f /docker-entrypoint-initdb.d/001_create_devices.sql
dev up:
$(COMPOSE) up -d
build:
$(COMPOSE) build
logs:
$(COMPOSE) logs -f api
logs-worker:
$(COMPOSE) logs -f worker
logs-all:
$(COMPOSE) logs -f
down:
$(COMPOSE) down
shell-postgres:
$(COMPOSE) exec postgres psql -U devices_user -d handheld_devices
shell-api:
$(COMPOSE) exec api sh
shell-worker:
$(COMPOSE) exec worker sh
status:
$(COMPOSE) ps