Change description
I suggest slight change to entry.sh:
diff --git a/docker/opt/cscapi/entry.sh b/docker/opt/cscapi/entry.sh
index 60e5db1..fe69425 100755
--- a/docker/opt/cscapi/entry.sh
+++ b/docker/opt/cscapi/entry.sh
@@ -8,9 +8,9 @@ log "INFO" "Launching the CSC API"
# Set debug options if required
if [ x"${REMOTE_DEBUG}" != x ] && [ "${REMOTE_DEBUG}" != "false" ]
then
- java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar ./app.jar
+ exec java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar ./app.jar
else
- java -jar ./app.jar --spring.config.location=optional:file:/opt/cscapi/application.yml
+ exec java -jar ./app.jar --spring.config.location=optional:file:/opt/cscapi/application.yml
fi
#exec "$@"
This asures that java run under PID=1 and thus receiving SIGTERM signal from Docker and correctly and faster shutdown. Without this change shutdown takes 10s, after change is shutdown within 1s.
Please read this info https://stackoverflow.com/questions/31836498/sigterm-not-received-by-java-process-using-docker-stop-and-the-official-java-i for detailed explanation if needed.
Change description
I suggest slight change to
entry.sh:This asures that
javarun under PID=1 and thus receiving SIGTERM signal from Docker and correctly and faster shutdown. Without this change shutdown takes 10s, after change is shutdown within 1s.Please read this info https://stackoverflow.com/questions/31836498/sigterm-not-received-by-java-process-using-docker-stop-and-the-official-java-i for detailed explanation if needed.