2022-05-13 14:44:30 +00:00
|
|
|
PROJECT = slack
|
|
|
|
VERSION = $(shell git rev-parse --short HEAD)
|
|
|
|
|
|
|
|
ECR_REPO = mail.caliban.io:5000
|
|
|
|
#APP_IMAGE = 482681734622.dkr.ecr.eu-west-1.amazonaws.com/$(PROJECT):$(VERSION)
|
|
|
|
APP_IMAGE = $(ECR_REPO)/$(PROJECT):$(VERSION)
|
|
|
|
NO_CACHE = true
|
|
|
|
|
|
|
|
|
|
|
|
#build docker image
|
|
|
|
build:
|
|
|
|
npm run build
|
2022-05-13 15:24:38 +00:00
|
|
|
docker build ./Docker/. -t $(APP_IMAGE) --build-arg VERSION=$(VERSION) --no-cache=$(NO_CACHE) --compress=true
|
2022-05-13 14:44:30 +00:00
|
|
|
.PHONY: build
|
|
|
|
|
|
|
|
#push docker image to registry
|
|
|
|
push: build
|
|
|
|
docker push $(APP_IMAGE)
|
|
|
|
.PHONY: push
|
|
|
|
|
|
|
|
#push docker image to registry
|
|
|
|
run: build
|
|
|
|
docker run $(APP_IMAGE)
|
|
|
|
.PHONY: run
|
|
|
|
ver:
|
|
|
|
@echo '$(VERSION)'
|
|
|
|
#echo $ERSION
|
|
|
|
.PHONY: ver
|
|
|
|
|
|
|
|
tar:
|
|
|
|
# docker build . -t $(APP_IMAGE) --build-arg VERSION=$(VERSION) --no-cache=$(NO_CACHE)
|
|
|
|
tar -C ./ -czvf ./archive.tar.gz 'package.json' 'ncas/' 'helpers/' -X *.js
|
|
|
|
|
|
|
|
.PHONY: build
|