From 416dc2673b5583176edd870e92e199ce6eddc142 Mon Sep 17 00:00:00 2001 From: klemek Date: Sun, 12 Apr 2026 11:11:05 +0200 Subject: [PATCH] chore(make): add uv --active and specify port --- Makefile | 9 +++++---- README.md | 12 ++++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7a11207..a24965a 100644 --- a/Makefile +++ b/Makefile @@ -6,11 +6,12 @@ ifeq (, $(shell which uv)) UV ?= python3 -m uv endif -RUFF ?= $(UV) run ruff -TY ?= $(UV) run ty +RUFF ?= $(UV) run --active ruff +TY ?= $(UV) run --active ty DOCKER ?= docker DOCKER_TAG ?= localhost/stapler:latest TOKEN ?= secret +PORT ?= 8080 # DOCS @@ -31,7 +32,7 @@ print-%: # FILES .venv: uv.lock - @$(UV) sync + @$(UV) sync --active # TOOLS @@ -61,7 +62,7 @@ docker-build: ## docker build .PHONY: docker-run docker-run: docker-build ## docker run - @$(DOCKER) run -it -p 8080:8080 -v ./data:/data $(DOCKER_TAG) --token $(TOKEN) + @$(DOCKER) run -it -p $(PORT):8080 -v ./data:/data $(DOCKER_TAG) --token $(TOKEN) # ACTIONS diff --git a/README.md b/README.md index bc062c6..8692522 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,9 @@ curl -X DELETE \ http://stapler-host/my-project/ ``` -## TODO +## Development + +### TODO - [x] basic http server - [x] docker container @@ -74,7 +76,7 @@ curl -X DELETE \ - [ ] log visits (and store accross sessions) - [ ] deliver visits in /page/visits -## Makefile targets +### Makefile targets ```txt Usage: make [target1] (target2) ... @@ -94,8 +96,10 @@ start start server in localhost Environment: UV = uv -RUFF = uv run ruff -TY = uv run ty +RUFF = uv run --active ruff +TY = uv run --active ty DOCKER = docker DOCKER_TAG = localhost/stapler:latest +TOKEN = secret +PORT = 8080 ```