mirror of
https://github.com/f/awesome-chatgpt-prompts.git
synced 2026-03-02 23:07:02 +00:00
Fix: Remove invalid --start flag and add supervisord readiness check
This commit is contained in:
@@ -109,9 +109,9 @@ else
|
||||
cd "$APP_DIR"
|
||||
fi
|
||||
|
||||
# Start PostgreSQL
|
||||
echo "▶ Starting PostgreSQL..."
|
||||
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf --start postgresql &
|
||||
# Start supervisord (manages PostgreSQL and Next.js)
|
||||
echo "▶ Starting services..."
|
||||
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf &
|
||||
SUPERVISOR_PID=$!
|
||||
|
||||
# Wait for PostgreSQL
|
||||
@@ -150,6 +150,24 @@ if [ ! -f "$SEED_MARKER" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Wait for supervisord socket to be ready
|
||||
echo "▶ Waiting for supervisord..."
|
||||
for i in $(seq 1 30); do
|
||||
if supervisorctl -c /etc/supervisor/conf.d/supervisord.conf status >/dev/null 2>&1; then
|
||||
echo "✓ Supervisord is ready"
|
||||
break
|
||||
fi
|
||||
if [ $i -eq 30 ]; then
|
||||
echo "✗ Supervisord failed to start"
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Start Next.js
|
||||
echo "▶ Starting Next.js..."
|
||||
supervisorctl -c /etc/supervisor/conf.d/supervisord.conf start nextjs
|
||||
|
||||
echo ""
|
||||
echo "╔═══════════════════════════════════════════════════════════════╗"
|
||||
echo "║ ║"
|
||||
|
||||
Reference in New Issue
Block a user