Nick is now deterministically generated from the exit endpoint hostname via seeded markov chain. Same exit IP always produces the same nick. Config nick field is optional fallback only. Registration uses generic ident (user/ident) and realname (realname/unknown) instead of random markov words. Also fixes compose env vars and build target to use podman-compose. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
49 lines
1.1 KiB
Makefile
49 lines
1.1 KiB
Makefile
APP_NAME := bouncer
|
|
VENV := .venv
|
|
PIP := $(VENV)/bin/pip
|
|
PYTHON := $(VENV)/bin/python
|
|
BOUNCER := $(VENV)/bin/bouncer
|
|
|
|
.PHONY: help venv install dev lint fmt test run clean build up down logs
|
|
|
|
help: ## Show this help
|
|
@grep -E '^[a-zA-Z_-]+:.*##' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*## "}; {printf " \033[38;5;110m%-12s\033[0m %s\n", $$1, $$2}'
|
|
|
|
venv: ## Create virtual environment
|
|
python3 -m venv $(VENV)
|
|
$(PIP) install --upgrade pip
|
|
|
|
install: venv ## Install package (editable)
|
|
$(PIP) install -e .
|
|
|
|
dev: venv ## Install with dev dependencies
|
|
$(PIP) install -e ".[dev]"
|
|
|
|
lint: ## Run linter
|
|
$(VENV)/bin/ruff check src/ tests/
|
|
|
|
fmt: ## Format code
|
|
$(VENV)/bin/black src/ tests/
|
|
$(VENV)/bin/ruff check --fix src/ tests/
|
|
|
|
test: ## Run tests
|
|
$(VENV)/bin/pytest -v
|
|
|
|
run: ## Run bouncer locally
|
|
$(BOUNCER) --config config/bouncer.toml
|
|
|
|
build: ## Build container image
|
|
podman-compose build
|
|
|
|
up: ## Start container (podman-compose)
|
|
podman-compose up -d
|
|
|
|
down: ## Stop container
|
|
podman-compose down
|
|
|
|
logs: ## Tail container logs
|
|
podman logs -f $(APP_NAME)
|
|
|
|
clean: ## Remove build artifacts
|
|
rm -rf $(VENV) dist build *.egg-info src/*.egg-info
|