diff --git a/README.md b/README.md index 001ab5b..7149a68 100644 --- a/README.md +++ b/README.md @@ -168,10 +168,37 @@ View real-time logs ```bash journalctl -fu virt-nexus-timer.service ``` -# Test the web application +### Test the web application Verify that the application is accessible via HTTPS: ```bash curl https://nexus-timer.virtonline.eu ``` Or open it in your browser: -[https://nexus-timer.virtonline.eu](https://nexus-timer.virtonline.eu) \ No newline at end of file +[https://nexus-timer.virtonline.eu](https://nexus-timer.virtonline.eu) + +### Update the app +Make code changes... +Do not forget to change the cache version +```bash +ver=$(grep -oP "CACHE_VERSION = 'nexus-timer-cache-v\K[0-9]+" public/service-worker.js) +sed -i "s/nexus-timer-cache-v$ver/nexus-timer-cache-v$((ver+1))/" public/service-worker.js +``` +Commit and push the code changes +```bash +git commit -m 'fixed visuals' +git push +``` +### Release the update +Pull the changes on your server +```bash +git pull +``` +Build the docker image and restart the service +```bash +docker build -t virt-nexus-timer . && systemctl restart virt-nexus-timer.service +``` +View real-time logs +```bash +journalctl -fu virt-nexus-timer.service +``` +The previously installed PWA should now offer an upgrade \ No newline at end of file diff --git a/public/service-worker.js b/public/service-worker.js index c4c89e5..186e767 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -1,4 +1,4 @@ -const CACHE_VERSION = 'nexus-timer-cache-v3.4'; +const CACHE_VERSION = 'nexus-timer-cache-v4'; const APP_SHELL_URLS = [ // '/', // Let NetworkFirst handle '/' '/manifest.json',