@@ -136,14 +136,6 @@ setup_macos() {
136136 info " Node.js already installed: $( node --version) "
137137 fi
138138
139- # Install Python 3
140- if ! command_exists python3; then
141- log " Installing Python 3..."
142- brew install python@3.11
143- else
144- info " Python already installed: $( python3 --version) "
145- fi
146-
147139 # Install Redis
148140 if ! command_exists redis-cli; then
149141 log " Installing Redis..."
@@ -231,17 +223,6 @@ setup_linux() {
231223 info " Node.js already installed: $( node --version) "
232224 fi
233225
234- # Install Python 3.11
235- if ! command_exists python3.11; then
236- log " Installing Python 3.11..."
237- apt-get install -y software-properties-common
238- add-apt-repository -y ppa:deadsnakes/ppa
239- apt-get update
240- apt-get install -y python3.11 python3.11-venv python3.11-dev python3-pip build-essential
241- else
242- info " Python 3.11 already installed: $( python3.11 --version) "
243- fi
244-
245226 # Install Redis
246227 if ! command_exists redis-cli; then
247228 log " Installing Redis..."
@@ -334,7 +315,6 @@ update_application() {
334315 BACKUP_FILE=" $BACKUP_DIR /backup-$( date +%Y%m%d_%H%M%S) .tar.gz"
335316 tar -czf " $BACKUP_FILE " \
336317 --exclude=' node_modules' \
337- --exclude=' venv' \
338318 --exclude=' logs' \
339319 -C " $( dirname " $APP_DIR " ) " " $( basename " $APP_DIR " ) "
340320 log " Backup created: $BACKUP_FILE "
@@ -367,28 +347,6 @@ update_application() {
367347 sudo -u " $DEPLOY_USER " npm run build:frontend
368348 fi
369349
370- # Install/Update Python dependencies
371- log " Setting up Python virtual environment..."
372- PYTHON_CMD=" python3"
373- if $IS_LINUX && command_exists python3.11; then
374- PYTHON_CMD=" python3.11"
375- fi
376-
377- if [[ ! -d venv ]]; then
378- if $IS_MACOS ; then
379- $PYTHON_CMD -m venv venv
380- else
381- sudo -u " $DEPLOY_USER " $PYTHON_CMD -m venv venv
382- fi
383- fi
384-
385- log " Installing Python dependencies..."
386- if $IS_MACOS ; then
387- source venv/bin/activate && pip install --upgrade pip && pip install -r requirements.txt
388- else
389- sudo -u " $DEPLOY_USER " bash -c " source venv/bin/activate && pip install --upgrade pip && pip install -r requirements.txt"
390- fi
391-
392350 # Set correct permissions (Linux only)
393351 if $IS_LINUX ; then
394352 log " Setting permissions..."
@@ -483,11 +441,9 @@ rollback_application() {
483441 if $IS_MACOS ; then
484442 pnpm install --frozen-lockfile
485443 npm run build:frontend
486- source venv/bin/activate && pip install -r requirements.txt
487444 else
488445 sudo -u " $DEPLOY_USER " pnpm install --frozen-lockfile
489446 sudo -u " $DEPLOY_USER " npm run build:frontend
490- sudo -u " $DEPLOY_USER " bash -c " source venv/bin/activate && pip install -r requirements.txt"
491447 fi
492448
493449 # Restart PM2 processes
0 commit comments