Run prepare4shutdown.sh before onlyoffice container is shut down by k8s
According to the infrared onlyoffice docs:
There exists a script called
prepare4shutdown.sh
that you should always run before you restart the server to make sure everything gets stored back in Nextcloud and you don't leave unwritten data lingering in the server. That script will close all user sessions and write data back to Nextcloud, but will not shutdown the server itself.If you are using
docker-compose
, run the following in the folder containingdocker-compose.yml
:container_id=$( docker ps -aqf "name=onlyoffice-documentserver" ) docker run -t -i ${container_id} /usr/local/sbin/prepare4shutdown.sh docker-compose down docker-compose up -d
Important: Currently, user's will have to clean their browser's caches when there's an update, otherwise the application can exhibit different weird behaviours (i.e. long loading times of even failing to load completelly).
We should run this in some kind of K8s pre-shutdown hook. Maybe something like this: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/
If you are using docker-compose
, run the following in the folder containing docker-compose.yml
:
container_id=$( docker ps -aqf "name=onlyoffice-documentserver" )
docker run -t -i ${container_id} /usr/local/sbin/prepare4shutdown.sh
docker-compose down
docker-compose up -d
Important: Currently, user's will have to clean their browser's caches when there's an update, otherwise the application can exhibit different weird behaviours (i.e. long loading times of even failing to load completelly).