tetris klaar
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
IMAGE ?= neo-tetris
|
||||
TAG ?= latest
|
||||
CTX ?= $(shell kubectl config current-context 2>/dev/null)
|
||||
|
||||
.PHONY: build push run deploy undeploy preview serve test pf status
|
||||
|
||||
## Lokaal de game draaien (zonder Docker)
|
||||
serve:
|
||||
python3 -m http.server 8000 --directory game
|
||||
|
||||
## Docker-image bouwen
|
||||
build:
|
||||
docker build -t $(IMAGE):$(TAG) .
|
||||
|
||||
## Image naar registry pushen
|
||||
push:
|
||||
docker push $(IMAGE):$(TAG)
|
||||
|
||||
## Container lokaal draaien op poort 8080
|
||||
run:
|
||||
docker run --rm -p 8080:80 $(IMAGE):$(TAG)
|
||||
|
||||
## K8s-manifests renderen/valideren (zonder iets te deployen)
|
||||
preview:
|
||||
kubectl kustomize k8s/
|
||||
|
||||
## Alles deployen naar Kubernetes
|
||||
deploy:
|
||||
kubectl apply -k k8s/ --context $(CTX)
|
||||
|
||||
## Alles verwijderen uit Kubernetes
|
||||
undeploy:
|
||||
kubectl delete -k k8s/ --context $(CTX)
|
||||
|
||||
## Logs van de pods volgen
|
||||
logs:
|
||||
kubectl logs -n games -l app=neo-tetris -f --context $(CTX)
|
||||
|
||||
## Spelen via port-forward (kiest je lokale browser op http://localhost:8088)
|
||||
pf:
|
||||
kubectl port-forward -n games svc/neo-tetris 8088:80 --context $(CTX)
|
||||
|
||||
## Status van de deployment bekijken
|
||||
status:
|
||||
kubectl -n games get pods,svc --context $(CTX)
|
||||
Reference in New Issue
Block a user