docs(readme): fix docker example to create valid save.json if missing (#12)

* docs(readme): fix docker example to create valid save.json if missing

Prevent runtime errors by initializing save.json with '{}' if the file does not exist before running the container.

Fixes #11

* Update README.md

---------

Co-authored-by: Pijus Kamandulis <pikami@users.noreply.github.com>
This commit is contained in:
zecka 2025-07-06 10:27:09 +02:00 committed by GitHub
parent fba9b3df5f
commit fb1c080034
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,7 +64,8 @@ There are two docker tags available:
If you wan to run the application using docker, configure it using environment variables see example: If you wan to run the application using docker, configure it using environment variables see example:
```sh ```sh
docker run --rm \ # Ensure save.json exists so Docker volume mounts correctly
[ -f save.json ] || echo '{}' > save.json && docker run --rm \
-e COSMIUM_PERSIST=/save.json \ -e COSMIUM_PERSIST=/save.json \
-v ./save.json:/save.json \ -v ./save.json:/save.json \
-p 8081:8081 \ -p 8081:8081 \