Create an SSL certificate signing request
dokku certs:generate <app_name> <mydomain>
Answer all the questions.
Submit that to an SSL signing authoority / online vendor. Wait for the cert to be generated.
Save the generated certificate as ssl.crt
in the following path /home/dokku/<app_name>/tls/server.key
.
Create a bundle crt file that contains your cert and the intermediate CA cert (you may need to include a root cert as well)
cat ssl.crt intermediate_ca.crt > bundle.crt
Tar up the bundle cert and the private key.
COPYFILE_DISABLE=1 tar cvf cert-key.tar bundle.crt server.key
Copy the cert-key.tar file to the server
scp cert-key.tar <mydomain>:<app_name>_bundle_cert_key.tar
Install the SSL cert
dokku certs:add <app_name> < <app_name>_bundle_cert_key.tar
Test the SSL is installed correctly using this tool