2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-09 14:50:58 +00:00
Nginx will now wait up to 10 seconds for frappe-python and frappe-socketio to be available
This commit is contained in:
Davide Bortolami 2020-03-04 14:15:25 +00:00
parent c21d26fa36
commit 922877bf92
2 changed files with 14 additions and 0 deletions

View File

@ -37,4 +37,11 @@ envsubst '${API_HOST}
${SOCKETIO_PORT}' \
< /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
echo "Waiting for frappe-python to be available on $FRAPPE_PY port $FRAPPE_PY_PORT"
timeout 10 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' $FRAPPE_PY $FRAPPE_PY_PORT
echo "Frappe-python available on $FRAPPE_PY port $FRAPPE_PY_PORT"
echo "Waiting for frappe-socketio to be available on $FRAPPE_PY port $FRAPPE_PY_PORT"
timeout 10 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' $FRAPPE_SOCKETIO $SOCKETIO_PORT
echo "Frappe-socketio available on $FRAPPE_PY port $FRAPPE_PY_PORT"
exec "$@"

View File

@ -36,4 +36,11 @@ envsubst '${API_HOST}
${SOCKETIO_PORT}' \
< /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
echo "Waiting for frappe-python to be available on $FRAPPE_PY port $FRAPPE_PY_PORT"
timeout 10 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' $FRAPPE_PY $FRAPPE_PY_PORT
echo "Frappe-python available on $FRAPPE_PY port $FRAPPE_PY_PORT"
echo "Waiting for frappe-socketio to be available on $FRAPPE_PY port $FRAPPE_PY_PORT"
timeout 10 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' $FRAPPE_SOCKETIO $SOCKETIO_PORT
echo "Frappe-socketio available on $FRAPPE_PY port $FRAPPE_PY_PORT"
exec "$@"