Set certificate

Overview

To override SSL setup, you must first deploy secrets to portainer and then configure the certificate and key in the configuration.

Usage

Edit front-end module.service file with the following content:

${{service-name}}:

ports:
    - "<port>:5000/tcp"
    - "<port>:5001/tcp"
    ...
environment:
    ...
    - APPLICATION_EXTERNAL_PORT=<port>
    - SSL_CERTIFICATE=/run/secrets/<secret-certificate-filename>
    - SSL_CERTIFICATE_KEY=/run/secrets/<secret-certificate-key-filename>
...
secrets:
    - source: <secret-certificate-filename>
    target: <secret-certificate-filename>
    - source: <secret-certificate-key-filename>
    target: <secret-certificate-key-filename>

Then edit stack.secrets in stack folder with following content :

secrets:
...
<secret-certificate-filename>:
    external: true
<secret-certificate-key-filename>:
    external: true

When updating HTTPS, you have to reflect the changes in web module.web file as follows:

{ ...
    "keycloakConfiguration"
: { ...
        "frontendHostname"
    : "https://<host>:<port>", ... } }