initial commit
This commit is contained in:
parent
ebd5bb09fd
commit
3046604b64
26 changed files with 1535 additions and 82 deletions
25
Makefile
25
Makefile
|
|
@ -1,4 +1,4 @@
|
|||
.PHONY: all build test vet fmt compose-up compose-down logs clean help
|
||||
.PHONY: all build test vet fmt compose-up compose-down logs clean help web-dev
|
||||
|
||||
GO_VERSION ?= 1.27.1
|
||||
BINARY_NAME ?= go-mad
|
||||
|
|
@ -19,7 +19,7 @@ build: fmt vet ## Build the Go binary
|
|||
## ---- Development ----
|
||||
|
||||
run: build ## Run the Go binary (requires postgres running)
|
||||
@$(BINARY_NAME)
|
||||
@$(BINARY_DIR)/$(BINARY_NAME)
|
||||
|
||||
compose-up: ## Start docker compose (postgres + go-mad)
|
||||
docker compose up --build -d
|
||||
|
|
@ -48,12 +48,10 @@ integration-test: ## Run integration tests (requires test database)
|
|||
## ---- Web Frontend ----
|
||||
|
||||
web-build: ## Build React frontend
|
||||
npm install
|
||||
npm run build
|
||||
cd web && npm install && npm run build
|
||||
|
||||
web-dev: ## Run React dev server
|
||||
npm install
|
||||
npm run dev
|
||||
web-dev: ## Start the go-mad application with Docker Compose
|
||||
@docker compose up --build -d
|
||||
|
||||
## ---- Docker ----
|
||||
|
||||
|
|
@ -75,24 +73,19 @@ help: ## Show this help message
|
|||
@echo ""
|
||||
@echo "Build targets:"
|
||||
@echo " build Build the Go binary"
|
||||
@echo " run Run the Go binary"
|
||||
@echo " run Run the Go binary (requires postgres running)"
|
||||
@echo " compose-up Start docker compose"
|
||||
@echo " compose-down Stop docker compose"
|
||||
@echo " compose-logs View docker compose logs"
|
||||
@echo ""
|
||||
@echo "Code quality:"
|
||||
@echo " fmt Format Go code"
|
||||
@echo " vet Vet Go code"
|
||||
@echo " test Run Go unit tests"
|
||||
@echo "Web frontend:"
|
||||
@echo " web-build Build React frontend"
|
||||
@echo " web-dev Start go-mad with docker compose"
|
||||
@echo ""
|
||||
@echo "Docker:"
|
||||
@echo " docker-build Build docker image"
|
||||
@echo " docker-push Push docker image"
|
||||
@echo ""
|
||||
@echo "Web frontend:"
|
||||
@echo " web-build Build React frontend"
|
||||
@echo " web-dev Run React dev server"
|
||||
@echo ""
|
||||
@echo "Other:"
|
||||
@echo " clean Remove build artifacts"
|
||||
@echo " help Show this help message"
|
||||
Loading…
Add table
Add a link
Reference in a new issue