diff --git a/scripts/full-deploy.sh b/scripts/full-deploy.sh index acb05dd..0c48a3b 100755 --- a/scripts/full-deploy.sh +++ b/scripts/full-deploy.sh @@ -83,6 +83,27 @@ preflight_checks() { fi print_success "Running from correct directory" + # Check if .env.production exists + if [ ! -f ".env.production" ]; then + print_error ".env.production not found. Please create it first." + exit 1 + fi + print_success ".env.production found" + + # Check if secrets directory exists + if [ ! -d "secrets" ]; then + print_error "secrets/ directory not found" + exit 1 + fi + print_success "secrets/ directory found" + + # Check if GCP credentials exist + if [ ! -f "secrets/gcp-credentials.json" ]; then + print_error "secrets/gcp-credentials.json not found" + exit 1 + fi + print_success "GCP credentials found" + # Check if Docker is running if ! docker info > /dev/null 2>&1; then print_error "Docker is not running" @@ -129,6 +150,10 @@ verify_code_updated() { rebuild_containers() { print_header "Rebuilding Docker Containers" + # Load environment variables + print_info "Loading environment variables from .env.production..." + export $(cat .env.production | grep -v '^#' | xargs) + print_info "Building images (this may take several minutes)..." docker compose $COMPOSE_FILES build --no-cache print_success "Docker images built"