chore(make): add uv --active and specify port

This commit is contained in:
2026-04-12 11:11:05 +02:00
parent ac2f31576f
commit 416dc2673b
2 changed files with 13 additions and 8 deletions
+5 -4
View File
@@ -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
+8 -4
View File
@@ -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
```