forked from localstack-samples/serverless-quiz-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
22 lines (15 loc) · 847 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
usage: ## Show usage for this Makefile
@cat Makefile | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
deploy: ## Deploy the application to LocalStack
bin/deploy.sh
web: ## Open the Web app in the browser (after the app is deployed)
DOMAIN_NAME=$$(awslocal cloudfront list-distributions | jq -r '.DistributionList.Items[0].DomainName'); \
echo "CloudFront URL: https://$$DOMAIN_NAME"; \
open "https://$$DOMAIN_NAME"
save-state: ## Save the application state to a local file
localstack state export app-state.zip
load-state: ## Load the application state from a local file
localstack state import app-state.zip
clean: ## Clean up any temporary files
rm *.zip
.PHONY: usage deploy web save-state load-state clean