44 lines
1.1 KiB
Makefile
44 lines
1.1 KiB
Makefile
.PHONY: help up down logs build api worker init smoke test fmt lint
|
|
|
|
help:
|
|
@echo "make up - start all services"
|
|
@echo "make down - stop all services"
|
|
@echo "make build - rebuild api/worker image"
|
|
@echo "make init - run db migrations + bootstrap opensearch + qdrant"
|
|
@echo "make smoke - run the smoke test inside the api container"
|
|
@echo "make test - pytest"
|
|
@echo "make logs - tail api+worker logs"
|
|
|
|
up:
|
|
@if [ "$(ALLOW_LOCAL)" != "1" ]; then \
|
|
echo "Local docker deploy disabled: TeamHUB runs on server 10.37.142.35. Run 'ALLOW_LOCAL=1 make up' to force a local bring-up for debugging."; \
|
|
exit 1; \
|
|
fi
|
|
docker compose up -d --build
|
|
|
|
down:
|
|
docker compose down
|
|
|
|
build:
|
|
docker compose build api worker
|
|
|
|
logs:
|
|
docker compose logs -f api worker
|
|
|
|
init:
|
|
docker compose exec api python scripts/init_db.py
|
|
docker compose exec api python scripts/init_opensearch.py
|
|
docker compose exec api python scripts/init_qdrant.py
|
|
|
|
smoke:
|
|
docker compose exec api python scripts/smoke_test.py
|
|
|
|
test:
|
|
pytest -q
|
|
|
|
fmt:
|
|
ruff format app scripts tests
|
|
|
|
lint:
|
|
ruff check app scripts tests
|