Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Setting up SSL

Joshua Zenn edited this page Jan 17, 2022 · 5 revisions

Because it is not possible to get a valid SSL certificate for the localhost domain, you will need to import this project's self-signed certificate to your trusted certificate store. This certificate is generated the first time you launch the Docker Compose stack and is completely safe to trust as long as you don't share any .crt or .key files with anyone or accidentally commit the certificate to GitHub.

Windows

  1. Run the entire Docker Compose stack with docker compose up --build for at least 30 seconds, or until text stops appearing in your terminal.
  2. From the project directory in Explorer, double-click on ./proxy/cert/virtudoc-https.pfx.
  3. In the dialog box that appears, select Current User
  4. Ensure that the path to the PFX file appears, then click next.
  5. Leave the password field blank, then click next.
  6. Select Place all certificates in the following store. Click Browse and select Trusted Root Certificate Authorities. Click next.
  7. Click finish to import the certificate and close the wizard. If a warning pops up, click accept.
  8. Restart your browser and/or your computer.
  9. Launch the Docker Compose stack, including the proxy component.
  10. In your browser, go to https://localhost and ensure that you do not receive a certificate warning.

MacOS

  1. Run the entire Docker Compose stack with docker compose up --build for at least 30 seconds, or until text stops appearing in your terminal.
  2. Open the project directory in your terminal.
  3. Run the following:
cd ./proxy/cert
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain virtudoc-https.pfx
  1. If prompted, enter your user account password to confirm the action.
  2. Restart your browser and/or your computer.
  3. Launch the Docker Compose stack, including the proxy component.
  4. In your browser, go to https://localhost and ensure that you do not receive a certificate warning.

Linux

  1. Run the entire Docker Compose stack with docker compose up --build for at least 30 seconds, or until text stops appearing in your terminal.
  2. Open the project directory in your terminal.
  3. Run the following:
cd ./proxy/cert
copy virtudoc-https.crt /usr/local/share/ca-certificates/virtudoc-https.crt
chmod 644 /usr/local/share/ca-certificates/virtudoc-https.crt
update-ca-certificates
# follow the on-screen prompts to add the certificate to the trusted root store.