|
@@ -1,13 +1,13 @@
|
|
|
-# Docker Example
|
|
|
+# Docker Example with NiceGUI
|
|
|
|
|
|
-This example shows how to use the NiceGUI release docker image
|
|
|
-[zauberzeug/nicegui from Docker Hub](https://hub.docker.com/r/zauberzeug/nicegui).
|
|
|
-It uses a `docker-compose.yml` file for convenience.
|
|
|
-Similar behavior can be archived with `docker run` and the corresponding parameters.
|
|
|
+This README provides a walkthrough on how to utilize the NiceGUI release docker image, [zauberzeug/nicegui, available on Docker Hub](https://hub.docker.com/r/zauberzeug/nicegui).
|
|
|
+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.
|
|
|
|
|
|
-## Try it out.
|
|
|
+## Testing the Setup
|
|
|
|
|
|
-Alter the docker-compose.yml file to your local host user's uid/gid and then run
|
|
|
+Modify the `docker-compose.yml` file to reflect your local host user's uid/gid.
|
|
|
+Following this, execute the command:
|
|
|
|
|
|
```bash
|
|
|
docker compose up
|
|
@@ -15,19 +15,19 @@ docker compose up
|
|
|
|
|
|
## Special Docker Features
|
|
|
|
|
|
-### Storage
|
|
|
+### Data Persistence
|
|
|
|
|
|
-NiceGUI automatically creates a `.nicegui` directory in the applications root directory (`/app` inside the docker container).
|
|
|
-In this example we mount the local `app` folder into the `/app` location of the container.
|
|
|
-This makes the `.nicegui` folder persistent across docker restarts.
|
|
|
-You can access http://localhost:8080, enter some data for storage and verify by restarting the container.
|
|
|
+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
|
|
|
+### Non-Root User Execution
|
|
|
|
|
|
-The app inside the container is executed as non-root.
|
|
|
-All files created by NiceGUI (for example the `.nicegui` persistence) will have the configured uid/gid.
|
|
|
+The application within the container operates as a non-root user.
|
|
|
+Consequently, all files generated by NiceGUI (such as the `.nicegui` persistence) will bear the configured uid/gid.
|
|
|
|
|
|
-### Docker signals
|
|
|
+### Docker Signal Pass-Through
|
|
|
|
|
|
-The docker image will passe signals from Docker like SIGTERM to issue a graceful shutdown of NiceGUI.
|
|
|
-If you stop the container (eg. Ctrl+C) and look at the logs (`docker compose logs) you should see it initiated `ui.shutdown` method.
|
|
|
+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.
|