Files
bouncer/Makefile
user d2144fc029 feat: add Containerfile and podman-compose setup
Host network mode for direct access to SOCKS5 proxy on localhost.
Config volume mounted from ./config. Makefile targets: build, up,
down, logs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 18:34:48 +01:00

49 lines
1.2 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 build -t $(APP_NAME) -f Containerfile .
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