From f9b8b0fadf56244732bba22452a17bc66bdcec5b Mon Sep 17 00:00:00 2001 From: schlagmichdoch Date: Wed, 17 Jul 2024 15:37:39 +0200 Subject: [PATCH] Fix dev environment variable FQDN missing and update docs --- .gitignore | 1 - docker-compose-dev.yml | 3 ++- docs/host-your-own.md | 15 ++++++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index ad32e4de..d2eca1ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ node_modules .DS_Store -fqdn.env /dev/certs qrcode-svg/ turnserver.conf diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index dc023973..091366d0 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -27,7 +27,8 @@ services: ports: - "8080:80" - "8443:443" - env_file: dev/fqdn.env + environment: + - FQDN=localhost entrypoint: /mnt/openssl/create.sh command: ["nginx", "-g", "daemon off;"] restart: unless-stopped \ No newline at end of file diff --git a/docs/host-your-own.md b/docs/host-your-own.md index 5190c07d..2c22a3dc 100644 --- a/docs/host-your-own.md +++ b/docs/host-your-own.md @@ -685,8 +685,8 @@ PWAs requires the app to be served under a correctly set up and trusted TLS endp The NGINX container creates a CA certificate and a website certificate for you. To correctly set the common name of the certificate, -you need to change the FQDN environment variable in `docker/fqdn.env` -to the fully qualified domain name of your workstation. +you need to change the FQDN environment variable in `docker-compose-dev.yml` +to the fully qualified domain name of your workstation. (Default: localhost) If you want to test PWA features, you need to trust the CA of the certificate for your local deployment. \ For your convenience, you can download the crt file from `http://:8080/ca.crt`. \ @@ -700,10 +700,15 @@ Install that certificate to the trust store of your operating system. \ - expand `Trust`, and select `Always Trust` for SSL. ##### Firefox -- Firefox uses its own trust store. To install the CA, -- point Firefox at `http://:8080/ca.crt`. +Firefox uses its own trust store. To install the CA: +- point Firefox at `http://:8080/ca.crt` (Default: `http://localhost:8080/ca.crt`) - When prompted, select `Trust this CA to identify websites` and click _OK_. +Alternatively: +1. Download `ca.crt` from `http://:8080/ca.crt` (Default: `http://localhost:8080/ca.crt`) +2. Go to `about:preferences#privacy` scroll down to `Security` and `Certificates` and click `View Certificates` +3. Import the downloaded certificate file (step 1) + ##### Chrome - When using Chrome, you need to restart Chrome so it reloads the trust store (`chrome://restart`). - Additionally, after installing a new cert, you need to clear the Storage (DevTools → Application → Clear storage → Clear site data). @@ -715,6 +720,6 @@ Install that certificate to the trust store of your operating system. \ Please note that the certificates (CA and webserver cert) expire after a day. Also, whenever you restart the NGINX Docker container new certificates are created. -The site is served on `https://:8443`. +The site is served on `https://:8443` (Default: `https://localhost:8443`). [< Back](/README.md)