Files
derp/Makefile
user c5b0430da8 docs: add podman-compose, update all project documentation
- docker-compose.yml for podman-compose deployment
- Makefile: add up/down/logs compose targets
- README: plugin table, container quickstart, make targets
- PROJECT: plugin categories, deployment matrix, design decisions
- ROADMAP: v0.1 done, v0.2 current, v0.3-v1.0 planned
- TASKS: current sprint with priorities
- TODO: full backlog organized by wave
- CHEATSHEET: reorganized by category (OSINT, Red Team, OPSEC)
- INSTALL: container deployment instructions
- DEBUG: container logs, hot-reload, DNS troubleshooting
- USAGE: all 19 commands documented

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 01:46:21 +01:00

65 lines
1.7 KiB
Makefile

.PHONY: install dev test lint clean help build container-run container-stop container-logs up down logs
APP_NAME := derp
VENV := .venv
PIP := $(VENV)/bin/pip
PYTHON := $(VENV)/bin/python
PYTEST := $(VENV)/bin/pytest
RUFF := $(VENV)/bin/ruff
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 .
$(PIP) install pytest ruff
test: ## Run tests
$(PYTEST) -v
lint: ## Run linter
$(RUFF) check src/ tests/ plugins/
fmt: ## Format code
$(RUFF) format src/ tests/ plugins/
run: ## Run the bot
$(PYTHON) -m derp
clean: ## Remove build artifacts
rm -rf build/ dist/ *.egg-info src/*.egg-info
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
link: install ## Symlink to ~/.local/bin
ln -sf $$(pwd)/$(VENV)/bin/derp ~/.local/bin/derp
@echo "Installed: $$(which derp)"
build: ## Build container image
podman build -t $(APP_NAME) .
container-run: ## Run bot in container (mount config + plugins)
podman run -d --name $(APP_NAME) \
-v ./config/derp.toml:/app/config/derp.toml:ro,Z \
-v ./plugins:/app/plugins:ro,Z \
$(APP_NAME)
container-stop: ## Stop and remove container
podman stop $(APP_NAME) && podman rm $(APP_NAME)
container-logs: ## Follow container logs
podman logs -f $(APP_NAME)
up: ## Start with podman-compose (build + detach)
podman-compose up -d --build
down: ## Stop with podman-compose
podman-compose down
logs: ## Follow compose logs
podman-compose logs -f