Skip to content

Commit

Permalink
Add help to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
petebachant committed Feb 13, 2025
1 parent 7238da8 commit 5c2ba73
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
.PHONY: help
help: ## Show this help.
@uv run python -c "import re; \
[[print(f'\033[36m{m[0]:<20}\033[0m {m[1]}') for m in re.findall(r'^([a-zA-Z_-]+):.*?## (.*)$$', open(makefile).read(), re.M)] for makefile in ('$(MAKEFILE_LIST)').strip().split()]"

DOCKER_COMPOSE_DEV=docker compose -f docker-compose.yml -f docker-compose.override.yml

.PHONY: dev
dev: ## Start up all containers for development.
${DOCKER_COMPOSE_DEV} up

.PHONY: frontend-dev
frontend-dev: ## Start the frontend dev server.
cd frontend && npm run dev

.PHONY: api-dev
api-dev:
api-dev: ## Start the backend alone using Docker Compose.
${DOCKER_COMPOSE_DEV} up backend

.PHONY: local-api
local-api:
local-api: ## Run the FastAPI backend directly.
cd backend && make local-api

.PHONY: dev
dev:
${DOCKER_COMPOSE_DEV} up

.PHONY: build-dev
build-dev:
build-dev: ## Build containers for development.
${DOCKER_COMPOSE_DEV} build

.PHONY: frontend-dev
frontend-dev:
cd frontend && npm run dev

0 comments on commit 5c2ba73

Please sign in to comment.