Skip to content

Commit 9c3cca5

Browse files
authored
🚀 Release: beta → master (#60)
* fix(deploy): harden VPS paths and remove monorepo residue - Standardize deploy root handling to DEPLOY_ROOT= in deploy workflow and environment loader scripts - Add fail-fast DEPLOY_ROOT directory guards in deploy paths - Add mandatory deploy debug visibility (USER/HOME/PWD + ls of HOME/api) to SSH deployment steps in deploy.yml - Remove hardcoded DEPLOY_ROOT=/api in sync-infra and rollback jobs - Keep env contract gate mandatory before deploy: ./scripts/validate-env.sh --check-monitoring - Normalize rollback and observability docs to use C:\Users\rajas/api and api.conf - Remove legacy apps/api and fieldtrack.conf references from tracked source, docs, and rollback SQL comments - Add optional safe legacy VPS repo cleanup in vps-setup.sh (AUTO_CLEAN_LEGACY_REPO=true) - Keep docker/network naming aligned: api-blue, api-green, api_network * feat(deploy): ensure log directory exists with fallback to home directory
1 parent 70e1dcb commit 9c3cca5

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎scripts/deploy-bluegreen.sh‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ trap '_ft_trap_err "$LINENO"' ERR
6363
_FT_STATE="INIT"
6464
DEPLOY_LOG_FILE="${DEPLOY_LOG_FILE:-/var/log/api/deploy.log}"
6565

66+
# Ensure log directory exists with fallback to home directory
67+
LOG_DIR="$(dirname "$DEPLOY_LOG_FILE")"
68+
if ! mkdir -p "$LOG_DIR" 2>/dev/null; then
69+
LOG_DIR="$HOME/api/logs"
70+
DEPLOY_LOG_FILE="$LOG_DIR/deploy.log"
71+
mkdir -p "$LOG_DIR"
72+
fi
73+
6674
_ft_log() {
6775
{ set +x; } 2>/dev/null
6876
local log_entry

0 commit comments

Comments
 (0)