-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
26 lines (19 loc) · 911 Bytes
/
Makefile
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
.PHONY: build docker run migrate source
GIT_HASH := $(shell git rev-parse HEAD)
source:
source "${PWD}/env.sh"
migrate: source
psql -d ${CIPHER_BIN_DB_NAME} -f "${PWD}/internal/db/init.sql"
run: source
go run main.go
docker-build:
docker buildx build --platform=linux/amd64 -t bradfordhamilton/cipher-bin-server:$(GIT_HASH) .
docker buildx build --platform=linux/amd64 -t bradfordhamilton/cipher-bin-server:latest .
docker buildx build --platform=linux/amd64 -t $(CIPHER_BIN_AWS_ECR)/cipher-bin-server:$(GIT_HASH) .
docker buildx build --platform=linux/amd64 -t $(CIPHER_BIN_AWS_ECR)/cipher-bin-server:latest .
docker-push:
docker push bradfordhamilton/cipher-bin-server:$(GIT_HASH)
docker push bradfordhamilton/cipher-bin-server:latest
docker push $(CIPHER_BIN_AWS_ECR)/cipher-bin-server:$(GIT_HASH)
docker push $(CIPHER_BIN_AWS_ECR)/cipher-bin-server:latest
docker: docker-build docker-push