Initial commit: Simple ASM - ARM assembly learning game
10-level progressive game teaching ARM assembly basics: registers, arithmetic, bitwise ops, memory, branching, loops. Vue 3 + FastAPI + SQLite with K8s deployment.
This commit is contained in:
27
Makefile
Normal file
27
Makefile
Normal file
@@ -0,0 +1,27 @@
|
||||
APP_NAME = simpleasm
|
||||
REGISTRY = registry.oci.euphon.net
|
||||
IMAGE = $(REGISTRY)/$(APP_NAME):latest
|
||||
|
||||
.PHONY: dev dev-backend dev-frontend build deploy
|
||||
|
||||
dev-backend:
|
||||
uvicorn backend.main:app --reload --port 8000
|
||||
|
||||
dev-frontend:
|
||||
cd frontend && npm run dev
|
||||
|
||||
sync:
|
||||
rsync -az --exclude node_modules --exclude .git --exclude __pycache__ --exclude '*.db' . oci:/tmp/$(APP_NAME)-build/
|
||||
|
||||
build: sync
|
||||
ssh oci "cd /tmp/$(APP_NAME)-build && docker build -t $(IMAGE) ."
|
||||
|
||||
deploy: build
|
||||
ssh oci "docker push $(IMAGE)"
|
||||
ssh oci "sudo k3s kubectl apply -f /tmp/$(APP_NAME)-build/deploy/namespace.yaml"
|
||||
@ssh oci "sudo k3s kubectl get secret regcred -n $(APP_NAME) 2>/dev/null" || \
|
||||
ssh oci "sudo k3s kubectl get secret regcred -n guitar -o yaml | sed 's/namespace: guitar/namespace: $(APP_NAME)/;/resourceVersion/d;/uid/d;/creationTimestamp/d' | sudo k3s kubectl apply -f -"
|
||||
ssh oci "sudo k3s kubectl apply -f /tmp/$(APP_NAME)-build/deploy/"
|
||||
ssh oci "sudo k3s kubectl rollout restart deployment/$(APP_NAME) -n $(APP_NAME)"
|
||||
ssh oci "sudo k3s kubectl rollout status deployment/$(APP_NAME) -n $(APP_NAME) --timeout=120s"
|
||||
@echo "Deployed to https://asm.oci.euphon.net"
|
||||
Reference in New Issue
Block a user