Gigwa container versions below 2.5 unfortunately had a bug regarding persistence of settings defined in config.properties. For persistence to work across container restarts, the real file has to be in a volume and the one in WEB-INF/classes has to be a symlink to the real file (this is how it works for other similar files). This will be fixed from v2.5, but upgrading will require to launch the script below while the old container is running:
#!/bin/bash
# This script must be executed on the Docker host while Gigwa container version below 2.5 is running, before upgrading to 2.5+. Its purpose is to move config.properties to a persistent volume $
# If you omitted to execute this script and upgraded to v2.5+, the web-application will fail starting. Just switch back to your previous container version, and you will still be able to execut$
containerId=$(docker ps -a | grep "guilhemsempere/gigwa:" | tr -s ' ' | cut -d ' ' -f1)
if [[ "$containerId" == "" ]]; then
echo Gigwa container version BELOW 2.5 must running to apply this fix
exit 1
fi
imageId=$(docker ps -a | grep "guilhemsempere/gigwa:" | tr -s ' ' | cut -d ' ' -f2)
result=$(docker exec -it ${containerId} bash -c "if [[ ! -L 'webapps/gigwa/WEB-INF/classes/config.properties' ]]; then mv webapps/gigwa/WEB-INF/classes/config.properties /usr/local/tomcat/config/config.properties && ln -s /usr/local/tomcat/config/config.properties webapps/gigwa/WEB-INF/classes/config.properties && echo 'Fix applied successfully: config.properties now in a volume'; else echo 'Nothing to do: config.properties was already in a volume'; fi")
echo $result
if [[ "$result" == *"successfully"* ]]; then
docker commit ${containerId} ${imageId} >/dev/null
echo Changes committed to current image ${imageId}, which should appear below as recently created. Upgrading to v2.5+ should be smooth...
docker image ls | head -2
fi
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4