Skip to content

Commit

Permalink
Merge pull request #54 from michMartineau/mmu/add-start-wait
Browse files Browse the repository at this point in the history
Be able to configure the server startup waiting duration
  • Loading branch information
shogo82148 authored Nov 17, 2023
2 parents 445dede + bc4f9a2 commit b70d7e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ inputs:
custom_api_endpoint:
description: 'Custom API endpoint of LanguageTool server. e.g. https://languagetool.org/api'
default: ''
wait_server_startup_duration:
description: 'Wait the startup of the server.'
default: '3'
runs:
using: 'docker'
image: 'Dockerfile'
Expand Down
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ API_ENDPOINT="${INPUT_CUSTOM_API_ENDPOINT}"
if [ -z "${INPUT_CUSTOM_API_ENDPOINT}" ]; then
API_ENDPOINT=http://localhost:8010
java -cp "/LanguageTool/languagetool-server.jar" org.languagetool.server.HTTPServer --port 8010 &
sleep 3 # Wait the server statup.
echo "Wait the server startup for ${INPUT_WAIT_SERVER_STARTUP_DURATION}s"
sleep "${INPUT_WAIT_SERVER_STARTUP_DURATION}" # Wait the server startup.
fi

echo "API ENDPOINT: ${API_ENDPOINT}" >&2
Expand Down

0 comments on commit b70d7e7

Please sign in to comment.