Optimize deployment for low-memory servers
- Skip activepieces rebuild when using --deploy-ap (already pre-built) - Use --parallel 1 for builds to reduce memory usage - Pass SKIP_AP_BUILD flag to remote deployment script 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
18
deploy.sh
18
deploy.sh
@@ -158,7 +158,14 @@ fi
|
||||
# Step 3: Deploy on server
|
||||
print_status "Step 3: Deploying on server..."
|
||||
|
||||
# Set SKIP_AP_BUILD if we already deployed activepieces image
|
||||
SKIP_AP_BUILD_FLAG=""
|
||||
if $DEPLOY_AP; then
|
||||
SKIP_AP_BUILD_FLAG="SKIP_AP_BUILD=true"
|
||||
fi
|
||||
|
||||
ssh "$SERVER" "bash -s" << ENDSSH
|
||||
$SKIP_AP_BUILD_FLAG
|
||||
set -e
|
||||
|
||||
echo ">>> Setting up project directory..."
|
||||
@@ -221,12 +228,17 @@ git log -1 --oneline
|
||||
cd smoothschedule
|
||||
|
||||
# Build images (all or specific services)
|
||||
# Note: If activepieces was pre-deployed via --deploy-ap, skip rebuilding it
|
||||
if [[ -n "$SERVICES" ]]; then
|
||||
echo ">>> Building Docker images: $SERVICES..."
|
||||
docker compose -f docker-compose.production.yml build $SERVICES
|
||||
docker compose -f docker-compose.production.yml build --parallel 1 $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
|
||||
else
|
||||
echo ">>> Building all Docker images..."
|
||||
docker compose -f docker-compose.production.yml build
|
||||
echo ">>> Building all Docker images (with low parallelism for memory)..."
|
||||
docker compose -f docker-compose.production.yml build --parallel 1
|
||||
fi
|
||||
|
||||
echo ">>> Starting containers..."
|
||||
|
||||
Reference in New Issue
Block a user