as-services/dockerfile-x/nginx/pre-stop.sh
devthejo d5febb45c8
Some checks failed
/ build (map[dockerfile:./services/tasks/Dockerfile name:tasks]) (push) Failing after 1m25s
/ deploy (push) Has been skipped
/ build (map[dockerfile:./services/files/Dockerfile name:files]) (push) Failing after 1m34s
/ build (map[dockerfile:./services/app/Dockerfile name:app]) (push) Successful in 2m9s
/ build (map[dockerfile:./services/api/Dockerfile name:api]) (push) Failing after 1m42s
/ build (map[dockerfile:./services/web/Dockerfile name:web]) (push) Failing after 1m18s
/ build (map[dockerfile:./services/watchers/Dockerfile name:watchers]) (push) Failing after 1m22s
/ build (map[dockerfile:./services/hasura/Dockerfile name:hasura]) (push) Successful in 2m3s
chore(init): available sources
2025-04-13 10:34:01 +02:00

20 lines
No EOL
346 B
Bash

#!/usr/bin/env sh
echo "set \$ready_response 'Not Ready';" > /etc/nginx/conf.d/ready_response.conf
nginx -s reload
WAIT_TIME=30
if [ "$1" ]; then
WAIT_TIME="$1"
fi
for i in $(seq 1 $WAIT_TIME); do
if [ "$(nginx -s status | grep 'Active connections' | awk '{print $3}')" -eq "0" ]; then
exit 0
fi
sleep 1
done
nginx -s stop
exit 0