From 6a063bfe89e5c34f69f54776652dfad734962ad9 Mon Sep 17 00:00:00 2001 From: Yves Gugger Date: Sat, 13 Dec 2025 16:04:07 +0100 Subject: [PATCH] Deploy script: protect .env and .db files from being overwritten --- deploy.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 477aad4..1990b43 100755 --- a/deploy.sh +++ b/deploy.sh @@ -48,13 +48,15 @@ sshpass -p "$SERVER_PASS" rsync -avz --delete \ --exclude '.git' \ frontend/ $SERVER_USER@$SERVER_HOST:$SERVER_PATH/frontend/ -# Sync backend +# Sync backend (exclude .env to preserve server config!) sshpass -p "$SERVER_PASS" rsync -avz --delete \ --exclude '__pycache__' \ --exclude '.pytest_cache' \ --exclude 'venv' \ --exclude '.git' \ --exclude '*.pyc' \ + --exclude '.env' \ + --exclude '*.db' \ backend/ $SERVER_USER@$SERVER_HOST:$SERVER_PATH/backend/ echo -e "\n${YELLOW}[5/5] Building and restarting on server...${NC}"