forked from AyazKhuraishi/ReactFO-ServiceFlow-front
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (35 loc) · 1.29 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
SHELL=/bin/bash
.PHONY: help
.DEFAULT_GOAL := build
.ONESHELL:
help: ## Print this help message.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
build: ## Build the React app.
npm run build
install: ## Install NPM dependencies
npm install
lint: ## Lint the source code.
npm run eslint
run: ## Run the app
npm run start
docker: ## Build the Docker image.
docker build . -t ${DOCKER_REPO}:${DOCKER_TAG} --build-arg TARGETARCH=amd64
docker-push: ## Push the Docker image into Docker Hub.
docker push ${DOCKER_REPO}:${DOCKER_TAG}
docker-dev-build: ## Build the dev Docker image. (layer caching works, faster)
docker build -f Dockerfile.dev . -t ${DOCKER_REPO}:${DOCKER_TAG}
docker-latest: ## Build and push the Docker image with 'latest' tag
export DOCKER_REPO='kubeshark/front' && \
export DOCKER_TAG='latest' && \
${MAKE} docker && \
${MAKE} docker-push
docker-canary: ## Build and push the Docker image with 'canary' tag
export DOCKER_REPO='kubeshark/front' && \
export DOCKER_TAG='canary' && \
${MAKE} docker && \
${MAKE} docker-push
docker-dev: ## Build and push the Docker image with 'dev' tag
export DOCKER_REPO='kubeshark/front' && \
export DOCKER_TAG='dev' && \
${MAKE} docker-dev-build && \
${MAKE} docker-push