Skip to content

Commit

Permalink
Fix PWA container waits too little during dev startup
Browse files Browse the repository at this point in the history
  • Loading branch information
D3strukt0r committed Nov 8, 2024
1 parent 2ee1283 commit 17b39d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion api/.docker/rootfs/docker-entrypoint.d/50_wait-for-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,7 @@ if [ $elapsed_seconds -gt $DEPS_TIMEOUT ]; then
entrypoint_error 'The db is not up or not reachable'
exit 1
else
entrypoint_info 'The db is now ready and reachable'
current_time="$(date -u +%s)"
elapsed_seconds=$((current_time - start_time))
entrypoint_info "The db is now ready and reachable after $elapsed_seconds seconds"
fi
1 change: 1 addition & 0 deletions compose.vm.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ services:
API_URL: http://api
VITE_PUBLIC_API_URL: https://api.wedding-manuele-robine.test
VITE_GOOGLE_MAPS_API_KEY:
DEPS_TIMEOUT: 120
depends_on:
- api
- traefik
Expand Down
4 changes: 3 additions & 1 deletion pwa/.docker/rootfs/docker-entrypoint.d/50_wait-for-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,7 @@ if [ $elapsed_seconds -gt $DEPS_TIMEOUT ]; then
entrypoint_error 'The api is not up or not reachable'
exit 1
else
entrypoint_info 'The api is now ready and reachable'
current_time="$(date -u +%s)"
elapsed_seconds=$((current_time - start_time))
entrypoint_info "The api is now ready and reachable after $elapsed_seconds seconds"
fi

0 comments on commit 17b39d5

Please sign in to comment.