Commit c5081b6
chore(backend): wait for directus before push/pull/seed
The scripts blindly try to authenticate as soon as they run. When the
backend container has just been started (the common case in CI and
after a 'docker compose up'), Directus hasn't finished booting yet and
the login request errors out with 'fetch failed / other side closed'.
directus-sync 3.5.1 provides a 'wait-server-ready' command exactly for
this. Adding it to the top of each script makes the scripts idempotent
with respect to startup timing, so 'docker compose up -d --build && ./push.sh'
just works without a manual sleep.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 6151806 commit c5081b6
3 files changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| |||
0 commit comments