-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (28 loc) · 1.27 KB
/
Makefile
File metadata and controls
40 lines (28 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.PHONY: help start-all stop-all start-sam-api start-dynamodb local-dynamodb-init build fmt clean remote-dynamodb-init
# Default target
.DEFAULT_GOAL := help
# Colors for output
GREEN := $(shell tput setaf 2)
YELLOW := $(shell tput setaf 3)
RESET := $(shell tput sgr0)
help: ## Display this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " $(GREEN)%-20s$(RESET) %s\n", $$1, $$2}'
@echo ''
compose-up: ## Start Docker containers
docker-compose up -d --force-recreate
local-dynamodb-init: ## Initialize DynamoDB Local using an external script
@./init-local-dynamodb.sh
sam-api: ## Start SAM API
sam local start-api --env-vars env.json --docker-network bonded_default
build: ## Build SAM application
go mod tidy # 依存関係を整理
sam build # SAMビルドを実行
start-all: compose-up local-dynamodb-init build sam-api ## Start and initialize Local DynamoDB, build SAM application, then start SAM API
compose-down: ## Stop and remove Docker containers
docker-compose down
fmt: ## Format all Go code files
@go fmt ./...
clean: ## Clean build artifacts
rm -rf .aws-sam
remote-dynamodb-init: ## Initialize Remote DynamoDB using an external script
@./init-dynamodb.sh