-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ar/fixing fastapi ea endpoint (#378)
* adding health check endpoint - GKE ingress needs for checking service status * changing endpoint path as static already exist for streamlit app * updating Dockerfile file to work with new fastapi endpoint
- Loading branch information
1 parent
22c5287
commit 1342a87
Showing
7 changed files
with
74 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
APP_PID= | ||
stopRunningProcess() { | ||
# Based on https://linuxconfig.org/how-to-propagate-a-signal-to-child-processes-from-a-bash-script | ||
if test ! "${APP_PID}" = '' && ps -p ${APP_PID} > /dev/null ; then | ||
> /proc/1/fd/1 echo "Stopping ${COMMAND_PATH} which is running with process ID ${APP_PID}" | ||
|
||
kill -TERM ${APP_PID} | ||
> /proc/1/fd/1 echo "Waiting for ${COMMAND_PATH} to process SIGTERM signal" | ||
|
||
wait ${APP_PID} | ||
> /proc/1/fd/1 echo "All processes have stopped running" | ||
else | ||
> /proc/1/fd/1 echo "${COMMAND_PATH} was not started when the signal was sent or it has already been stopped" | ||
fi | ||
} | ||
|
||
trap stopRunningProcess EXIT TERM | ||
|
||
source .venv/bin/activate | ||
|
||
encord-active visualize --target /data | ||
|
||
APP_ID=${!} | ||
|
||
wait ${APP_ID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters