-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
62 lines (53 loc) · 1.57 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
## build: will build go to a binary
build:
@echo "Building go binary"
go mod tidy
cd cmd && go build -o ../bin/kubeomatic
@echo "Build Done!"
## run: this will run the go binary
run:
@echo "Running Kube-o-Matic..."
cd bin && chmod +x kubeomatic && ./kubeomatic
@echo "Done!"
## deploy: this will deploy kube-o-matic to your kubernetes cluster using kubectl
deploy:
@echo "Deploying Kube - o - matic..."
kubectl apply -k /manifests
@echo "Done!"
## BuildAndRun: builds and runs the docker image
BuildAndRun:
@echo "Building Docker Image"
docker build -t kube-o-matic:latest .
@echo "Done Building Image"
@echo "Running docker image"
docker run -p 8555:8555 -d --name kube-o-matic kube-o-matic:latest
@echo "Docker Run complete"
## PullAndRun: pulls the docker image from Github Image Registry ghcr.io
PullAndRun:
@echo "Pulling Docker image..."
docker pull docker pull ghcr.io/miladhzzzz/kube-o-matic:main
@echo "Running the Cotainer..."
docker run -p 8555:8555 -d --name kube-o-matic ghcr.io/miladhzzzz/kube-o-matic:main
@echo "Done!"
## down: stops the docker container
down:
@echo "Stoping container..."
docker stop kube-o-matic
@echo "Deleting Cotainer..."
docker rm kube-o-matic
@echo "Done!"
## CleanDocker: cleans the docker of any image or container
CleanDocker:
@echo "Cleaning Docker..."
@echo "Stoping container..."
docker stop kube-o-matic
@echo "Deleting Cotainer..."
docker rm kube-o-matic
@echo "Deleting image"
docker image rm kube-o-matic:latest
@echo "Done!"
## swag: makes docs/ swagger ui
swag:
@echo "Making swagger UI"
swag init
@echo "Done!"