Add button to restart container after Zim file download
The problem:
When I download a new Zim file, I get an error from Kiwix saying: "Kiwix must be restarted. New Zim files have been downloaded; you must restart your containers. Run the following to restart your containers: docker-compose restart". Currently, I need to open the terminal and manually run the docker-compose command to restart the containers.
Solution
I would like a button in the web interface that allows me to restart the container directly, without having to open a terminal. This would make the process much more user-friendly and accessible.
I looked into this a little bit. I could share the /var/run/docker.sock socket with the API container as a volume, and allow it to restart other containers. But, this has serious security implications.
I have purposefully kept WROLPi from being too secure. Something that is secure is hard to get into, which means the data on a WROLPi could accidentally become inaccessible (forgotten password, etc.). Currently, WROLPi should never be accessible from the internet, and I don't plan on changing that. I don't plan on making WROLPi secure because that would make it harder for layman to access the data without the Maintainer helping them. I expect the majority of users of a particular WROLPi will be laymen.
I would like to create a new Controller service for WROLPi, and move some functionality from the API into this controller (restart the WROLPi, system stats, etc.). Its possible that I could make the Controller service more secure, and have it handle restarting of docker containers.
This feature will have to wait for the Controller service, if its ever included.