Skip to content

Commit

Permalink
Fix dev environment variable FQDN missing and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
schlagmichdoch committed Jul 17, 2024
1 parent 331c61f commit f9b8b0f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
node_modules
.DS_Store
fqdn.env
/dev/certs
qrcode-svg/
turnserver.conf
Expand Down
3 changes: 2 additions & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 10 additions & 5 deletions docs/host-your-own.md
Original file line number Diff line number Diff line change
Expand Up @@ -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://<Your FQDN>:8080/ca.crt`. \
Expand All @@ -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://<Your FQDN>:8080/ca.crt`.
Firefox uses its own trust store. To install the CA:
- point Firefox at `http://<Your FQDN>: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://<Your FQDN>: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).
Expand All @@ -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://<Your FQDN>:8443`.
The site is served on `https://<Your FQDN>:8443` (Default: `https://localhost:8443`).

[< Back](/README.md)

0 comments on commit f9b8b0f

Please sign in to comment.