Fixed docker stop behavior.

- Adjusted start script in debug mode to make sure the main java process
can receive signals such as SIGTERM
- Modified docker images main command to properly propagate SIGTERM
signal to the main java process
pull/100/head
luccioman 8 years ago
parent 1df558a6c6
commit 1eafa7bfaf

@ -53,4 +53,4 @@ VOLUME ["/opt/yacy_search_server/DATA"]
USER yacy
# Start yacy in debug mode (-d) to display console logs and to wait for yacy process
CMD sh /opt/yacy_search_server/startYACY.sh -d
CMD ["/bin/sh","/opt/yacy_search_server/startYACY.sh","-d"]

@ -85,4 +85,4 @@ VOLUME ["/opt/yacy_search_server/DATA"]
USER yacy
# Start yacy in debug mode (-d) to display console logs and to wait for yacy process
CMD sh /opt/yacy_search_server/startYACY.sh -d
CMD ["/bin/sh","/opt/yacy_search_server/startYACY.sh","-d"]

@ -140,6 +140,10 @@ And configure the pkcs12XXX properties accordingly :
docker exec [your_container_name] /opt/yacy_search_server/stopYACY.sh
* OR run :
docker stop [your_container_name]
### Upgrade
You can upgrade your YaCy container the Docker way with the following commands sequence.

@ -224,10 +224,16 @@ else
echo "** STOP YaCy: execute stopYACY.sh and wait some seconds **"
echo "** GET HELP for YaCy: see http://wiki.yacy.net and http://forum.yacy.de **"
echo "*******************************************************************************"
echo " >> YaCy started as daemon process. Administration at http://localhost:$PORT << "
eval $cmdline
if [ "$TAILLOG" -eq "1" -a ! "$DEBUG" -eq "1" ];then
sleep 1
tail -f DATA/LOG/yacy00.log
if [ $DEBUG -eq 1 ] #debug
then
# with exec the java process become the main process and will receive signals such as SIGTERM
exec $cmdline
else
echo " >> YaCy started as daemon process. Administration at http://localhost:$PORT << "
eval $cmdline
if [ "$TAILLOG" -eq "1" -a ! "$DEBUG" -eq "1" ];then
sleep 1
tail -f DATA/LOG/yacy00.log
fi
fi
fi

Loading…
Cancel
Save