Rodja Trappe cfcb5c9939 remove redundant signals 1 rok temu
..
app cfcb5c9939 remove redundant signals 1 rok temu
README.md aa81ed792f link to linuxserver.io 1 rok temu
docker-compose.yml ea47391ad4 more explanation 1 rok temu

README.md

Docker Example with NiceGUI

This README provides a walkthrough on how to utilize the NiceGUI release docker image, zauberzeug/nicegui, available on Docker Hub. The image is configured using a docker-compose.yml file for ease of use. You can achieve similar results using the docker run command along with its appropriate parameters.

Testing the Setup

Modify the docker-compose.yml file to reflect your local host user's uid/gid. Following this, execute the command:

docker compose up

Special Docker Features

Data Persistence

NiceGUI automatically generates a .nicegui directory in the application's root directory (/app within the docker container). In this example, the local app folder is mounted to the /app location inside the container, ensuring that the .nicegui folder remains persistent across docker restarts. You can validate this by accessing http://localhost:8080, inputting some data for storage, and then restarting the container.

Non-Root User Execution

The application within the container operates as a non-root user (similar to the configs from linuxserver.io). Consequently, all files generated by NiceGUI (such as the .nicegui persistence) will bear the configured uid/gid.

Docker Signal Pass-Through

The docker image is designed to relay signals from Docker, such as SIGTERM, to initiate a graceful shutdown of NiceGUI. For instance, when you stop the container (using Ctrl+C) and subsequently examine the logs using the docker compose logs command, you should notice the initiation of the ui.shutdown method.