name: zeabur-startup-order description: Use when service fails with Connection refused to database or redis. Use when API crashes because DB not ready.
Zeabur Startup Order Issues
Always use
npx zeabur@latestto invoke Zeabur CLI. Never usezeaburdirectly or any other installation method. Ifnpxis not available, install Node.js first.
Symptom
Connection refused :5432
connection to server at "X" failed
OperationalError: connection failed
Cause
Service starts before dependency (DB/Redis) is ready.
Fix
Add wait logic to service command (command MUST be inside source):
# Python example
spec:
source:
image: myapp:latest
command:
- /bin/sh
- -c
- "python manage.py wait_for_db && exec ./entrypoint.sh"
Or for Node.js:
spec:
source:
image: myapp:latest
command:
- /bin/sh
- -c
- "until nc -z postgres 5432; do sleep 1; done && node server.js"
Quick Fix
If DB is now ready, just restart the failed service:
npx zeabur@latest service restart --id <service-id> -y -i=false
See Also
-
zeabur-template— template YAML reference for startup commands and dependencies -
zeabur-restart— restart services after fixing startup order
chat Comments (0)
Sign in to join the discussion and leave a comment.
Skill Details
GitHub Stars
10
GitHub Forks
1
Created
Mar 2026
Last Updated
3个月前
development
development architecture patterns
Related Skills
Build your own?
Join 12,000+ developers contributing to the Claude ecosystem.
No comments yet. Be the first to share your thoughts!