-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
26 lines (20 loc) · 770 Bytes
/
makefile
File metadata and controls
26 lines (20 loc) · 770 Bytes
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
#!make
SHELL:=/bin/bash
export PROJECT_NAME := tanz-demo-node
export TARGET_PORT := 80
export REGION := ap-southeast-2
export ECR_REPO_URL := 533545012068.dkr.ecr.ap-southeast-2.amazonaws.com
export VERSION := latest
export BRANCH_NAME :=$(shell git branch --show-current)
ecr:
aws ecr get-login-password \
--region ${REGION} \
| docker login \
--username AWS \
--password-stdin ${ECR_REPO_URL}
build: ecr
docker build -f Dockerfile.dev --no-cache -t $(PROJECT_NAME):latest .
docker tag $(PROJECT_NAME):latest $(ECR_REPO_URL)/$(PROJECT_NAME):$(VERSION)
docker push $(ECR_REPO_URL)/$(PROJECT_NAME):$(VERSION)
run-dev: ecr
docker-compose -f ./deployment/docker-compose.dev.yml up --build --force-recreate --remove-orphans -d