Fix deploy script parallel build syntax

- Use COMPOSE_PARALLEL_LIMIT env var instead of --parallel flag
- Fix SKIP_AP_BUILD variable passing in heredoc

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
poduck
2025-12-21 15:52:53 -05:00
parent 7baf110235
commit 8564b1deba

View File

@@ -159,13 +159,13 @@ fi
print_status "Step 3: Deploying on server..."
# Set SKIP_AP_BUILD if we already deployed activepieces image
SKIP_AP_BUILD_FLAG=""
SKIP_AP_BUILD_VAL="false"
if $DEPLOY_AP; then
SKIP_AP_BUILD_FLAG="SKIP_AP_BUILD=true"
SKIP_AP_BUILD_VAL="true"
fi
ssh "$SERVER" "bash -s" << ENDSSH
$SKIP_AP_BUILD_FLAG
SKIP_AP_BUILD="$SKIP_AP_BUILD_VAL"
set -e
echo ">>> Setting up project directory..."
@@ -229,16 +229,18 @@ cd smoothschedule
# Build images (all or specific services)
# Note: If activepieces was pre-deployed via --deploy-ap, skip rebuilding it
# Use COMPOSE_PARALLEL_LIMIT to reduce memory usage on low-memory servers
export COMPOSE_PARALLEL_LIMIT=1
if [[ -n "$SERVICES" ]]; then
echo ">>> Building Docker images: $SERVICES..."
docker compose -f docker-compose.production.yml build --parallel 1 $SERVICES
docker compose -f docker-compose.production.yml build $SERVICES
elif [[ "$SKIP_AP_BUILD" == "true" ]]; then
# Skip activepieces build since we pre-built and transferred it
echo ">>> Building Docker images (excluding activepieces - pre-built)..."
docker compose -f docker-compose.production.yml build --parallel 1 django nginx traefik postgres celeryworker celerybeat flower awscli verdaccio
docker compose -f docker-compose.production.yml build django nginx traefik postgres celeryworker celerybeat flower awscli verdaccio
else
echo ">>> Building all Docker images (with low parallelism for memory)..."
docker compose -f docker-compose.production.yml build --parallel 1
echo ">>> Building all Docker images..."
docker compose -f docker-compose.production.yml build
fi
echo ">>> Starting containers..."