mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
updated entrypoint
This commit is contained in:
1 parent
0b12917a09
commit
d014fb916f
1 file changed
+3
-4
@@ -1,13 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# The backend hostname is 'holy-backend' based on docker-compose.yml
|
# Wait for the Rust backend (holy-rust:8001) before serving.
|
||||||
# We wait for port 8000 to be open
|
echo "Waiting for backend (holy-rust:8001) to be available..."
|
||||||
echo "Waiting for backend (holy-backend:8000) to be available..."
|
|
||||||
|
|
||||||
MAX_RETRIES=30
|
MAX_RETRIES=30
|
||||||
COUNT=0
|
COUNT=0
|
||||||
|
|
||||||
while ! nc -z holy-backend 8000; do
|
while ! nc -z holy-rust 8001; do
|
||||||
COUNT=$((COUNT + 1))
|
COUNT=$((COUNT + 1))
|
||||||
if [ $COUNT -ge $MAX_RETRIES ]; then
|
if [ $COUNT -ge $MAX_RETRIES ]; then
|
||||||
echo "Backend timed out after $MAX_RETRIES attempts - starting Nginx anyway"
|
echo "Backend timed out after $MAX_RETRIES attempts - starting Nginx anyway"
|
||||||
|
|||||||
Reference in new issue
Block a user