diff --git a/README.md b/README.md index fb6815f..81eb382 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,16 @@ When exposing your self-hosted Huly deployment to the internet, it's crucial to ## Generating Public and Private VAPID keys for front-end -You'll need `Node.js` installed on your machine. Installing `npm` on Debian based distro: +A VAPID key pair allows your self-hosted application server to deliver Web Push Notifications to your clients via push services. + +### Generate the VAPID keys + +A VAPID key pair can be generated by a plethora of methods, use whichever method is most convenient for you.\ +Some example methods are provided below. + +#### Using `Node.js` on your machine to generate VAPID keys: + +Install `npm` on Debian based distro: ``` sudo apt-get install npm ``` @@ -72,6 +81,26 @@ asdfsadfasdfsfd ======================================= ``` + +#### Using `Node.js` in Docker to generate VAPID keys: +Run this docker one-liner to generate a VAPID key pair: +``` +docker run --rm node npm exec --package=web-push -- web-push generate-vapid-keys +``` +It will generate both keys that looks like this: +``` +======================================= + +Public Key: +sdfgsdgsdfgsdfggsdf + +Private Key: +asdfsadfasdfsfd + +======================================= +``` + +### Store your VAPID keys Keep these keys secure, as you will need them to set up your push notification service on the server. Add these keys into `compose.yaml` in section `services:front:environment`: