From 967943804521f0a15858a1d0e12664e89b1dad97 Mon Sep 17 00:00:00 2001 From: Alexander Skrinnik Date: Tue, 23 Jan 2024 13:04:20 +0200 Subject: [PATCH] Update README.md with 'Use a production certificate' section --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index bcab7de..2387346 100644 --- a/README.md +++ b/README.md @@ -146,3 +146,16 @@ And the `statics.json` file will be like this: } ] ``` + +## Use a production certificate +The image uses the self-signed certificate. It is represented as `server-key.pem` and `server-cert.pem` files in a `data` folder. But there is an ability to replace it with your production certificate. + +If you have a PFX file, it should be [converted to `key` and `cert` files with the openssl tool](https://www.bluelabellabs.com/blog/how-to-export-certificates-from-windows-for-use-in-apache-nginx-on-linux/). +Then the files should be bound to a container. + +``` +docker run -d -p 8443:8000 \ + -v $PWD/examples/rewrite/server.key:/data/server-key.pem \ + -v $PWD/examples/rewrite/cert.pem:/data/server-cert.pem \ + fabriciomendonca/json-server-https +```