Files
buchwerk/Makefile
2026-09-27 22:03:05 +02:00

35 lines
944 B
Makefile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
.PHONY: install build run dev auth prod stop logs
PY := .venv/bin/python
COMPOSE = docker compose
install:
python3 -m venv .venv
.venv/bin/pip install -r backend/requirements.txt
cd frontend && npm install
build:
cd frontend && npm run build
run:
$(PY) -m uvicorn backend.main:app --port 8020
dev:
$(PY) -m uvicorn backend.main:app --reload --port 8020 & cd frontend && npm run dev
auth:
@mkdir -p .claude-data storage
@chown -R 1000:1000 .claude-data storage 2>/dev/null || sudo chown -R 1000:1000 .claude-data storage
@grep -q "^CLAUDE_CODE_OAUTH_TOKEN=.\+" .env 2>/dev/null || grep -q "^ANTHROPIC_API_KEY=.\+" .env 2>/dev/null \
|| echo "WARNUNG: weder CLAUDE_CODE_OAUTH_TOKEN noch ANTHROPIC_API_KEY in .env – Agenten können nicht starten (Token: claude setup-token)."
prod: auth
$(COMPOSE) up -d --build
@echo "buchwerk läuft: https://buchwerk.marha.de"
stop:
$(COMPOSE) down
logs:
$(COMPOSE) logs -f --tail=200