A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix(dev): worker not started properly in helper start script (#1946)
xuatz6ba61b46154e
diff --git a/start-dev.sh b/start-dev.shindex 0f5f9d2e..52f5a6d8 100755--- a/start-dev.sh+++ b/start-dev.sh@@ -33,7 +33,7 @@ fi# Start Chrome if not already runningif ! port_in_use 9222; thenecho "Starting headless Chrome..."- docker run -d -p 9222:9222 --name karakeep-chrome gcr.io/zenika-hub/alpine-chrome:123 \+ docker run -d -p 9222:9222 --name karakeep-chrome gcr.io/zenika-hub/alpine-chrome:124 \--no-sandbox \--disable-gpu \--disable-dev-shm-usage \@@ -61,22 +61,11 @@ if [ -n "$DATA_DIR" ] && [ ! -d "$DATA_DIR" ]; thenmkdir -p "$DATA_DIR"fi-# Start the web app-echo "Starting web app..."-pnpm web & WEB_PID=$!--# Wait for web app to be ready-echo "Waiting for web app to start..."-until curl -s http://localhost:3000 > /dev/null 2>&1; do- sleep 1-done--# Run database migrationsecho "Running database migrations..."pnpm run db:migrate-# Start workers-echo "Starting workers..."+echo "Starting web app and workers..."+pnpm web & WEB_PID=$!pnpm workers & WORKERS_PID=$!# Function to handle script termination@@ -88,6 +77,20 @@ cleanup() {exit 0}+# Wait for web app to be ready (max 30 seconds)+echo "Waiting for web app to start..."+ATTEMPT=0+while [ $ATTEMPT -lt 30 ]; do+ if nc -z localhost 3000 2>/dev/null; then+ break+ fi+ sleep 1+ ATTEMPT=$((ATTEMPT + 1))+ if [ $ATTEMPT -eq 30 ]; then+ echo "Warning: Web app may not have started properly after 30 seconds"+ fi+done+# Set up trap to catch termination signalstrap cleanup SIGINT SIGTERM