-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
20 lines (17 loc) · 850 Bytes
/
Makefile
File metadata and controls
20 lines (17 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
export AWS_DEFAULT_REGION = us-east-1
export AWS_ACCOUNT = 123456789012
usage: ## Show this help
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
deploy-image:
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $(AWS_ACCOUNT).dkr.ecr.us-east-1.amazonaws.com
docker build --tag monitor-service --file docker/Dockerfile --load .
docker tag monitor-service:latest $(AWS_ACCOUNT).dkr.ecr.us-east-1.amazonaws.com/monitor-service-prod:latest
docker push $(AWS_ACCOUNT).dkr.ecr.us-east-1.amazonaws.com/monitor-service-prod:latest
deploy-lambda:
tarraform init
terraform workspace select dev
terraform apply --var-file=config/dev.tfvars
run:
docker run -p 8080:8080 --env-file .env monitor-service
deploy-all: deploy-image deploy-lambda
.PHONY: usage push