diff --git a/Makefile b/Makefile index 7025c43..2ad0032 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,9 @@ export VENV := .venv UVICORN := $(VENV)/bin/uvicorn TEST_DEPS := $(VENV)/.test-deps +K3S_BTCDATA_PORT := 4100 -.PHONY: clean run run-local run-citadel tailwind test venv +.PHONY: clean run run-local run-citadel run-k3s tailwind test venv venv: $(UVICORN) @@ -26,6 +27,12 @@ run-local: venv run-citadel: venv BTCDATA_URL=$(BTCDATA_URL) $(UVICORN) app.main:app --host 0.0.0.0 --port 4000 --reload +run-k3s: venv + kubectl -n btcdata port-forward service/btcdata $(K3S_BTCDATA_PORT):4101 & \ + port_forward_pid=$$!; \ + trap 'kill $$port_forward_pid' EXIT INT TERM; \ + BTCDATA_URL=http://127.0.0.1:$(K3S_BTCDATA_PORT) $(UVICORN) app.main:app --host 0.0.0.0 --port 4000 --reload + tailwind: npm run css:watch diff --git a/app/main.py b/app/main.py index 243a53c..c813b22 100644 --- a/app/main.py +++ b/app/main.py @@ -47,6 +47,7 @@ HOME_HTML = """\