chore: remove redundant .env copy commands from deploy targets

The .env file is now expected to be present before running deploy commands. This simplifies the Makefile by removing conditional copy logic that was causing confusion about environment setup.
This commit is contained in:
Jp
2026-02-26 11:19:19 +08:00
parent ac41090ed3
commit aef00b405a

View File

@@ -9,7 +9,6 @@ SERVER_IP := 192.168.100.105
SERVER_PATH := /var/www/mkm-admin
deploy: build
@if [ ! -f .env ]; then cp .env.example .env; fi
@echo "Cleaning up existing deployment if any..."
-podman kube down k8s/deployment.yaml
@echo "Generating merged deployment with ConfigMap..."
@@ -22,7 +21,6 @@ deploy: build
deploy-server:
@echo "Deploying to remote server $(SERVER_IP)..."
@if [ ! -f .env ]; then cp .env.example .env; fi
ssh $(SERVER_USER)@$(SERVER_IP) "mkdir -p $(SERVER_PATH)/k8s"
scp .env $(SERVER_USER)@$(SERVER_IP):$(SERVER_PATH)/.env
scp k8s/deployment.yaml $(SERVER_USER)@$(SERVER_IP):$(SERVER_PATH)/k8s/deployment.yaml