[Solved] HTTPS Setup Unimus Docker

Unimus support forum
Post Reply
Posts: 1
Joined: Mon Aug 15, 2022 8:02 am

Mon Aug 15, 2022 8:05 am

Hi there,

Is there any instruction how to setup HTTPS in a Docker environment? I tried to follow this guide:
https://wiki.unimus.net/display/UNPUB/U ... igned+cert

But there are some missing points like file "'/etc/default/unimus" or the folder "/opt/unimus"

Thanks in advance!
Posts: 198
Joined: Thu Aug 05, 2021 6:35 pm

Mon Aug 15, 2022 1:49 pm


There are multiple ways how to go around this, but the one I use personally is that I copy a certificate to the persistent folder mapped to the internal /etc/unimus folder within the docker. I then add parameters to point Unimus at a certificate, which you'd normally add to /etc/default/unimus directly, to the docker-compose file's JAVA_OPTS property.

Here's my simple docker-compose file example:

Code: Select all

version: "3"

    image: croc/unimus
      # base memory params for java
      #- XMX=1024M
      #- XMS=256M
      # OR more customizable JAVA options
      - JAVA_OPTS=-Xms256M -Xmx1024M -Dunimus.core.connect-timeout=20000 -Dunimus.core.inter-connection-delay=1000 -Du
nimus.core.cli-expect-timeout=30000 -Dserver.ssl.key-store=/etc/unimus/unimus.keystore.p12 -Dserver.ssl.keyStoreType=P
KCS12 -Dserver.ssl.keyAlias=unimus -Dserver.ssl.key-store-password=exquisitepassword
      - TZ=Europe/Budapest
      - '/root/unimus_docker/etc/unimus:/etc/unimus'
      #- '/etc/localtime:/etc/localtime:ro'
      - '8085:8085'
#      - '5509:5509' # for unimus-core connection if the unimus version is higher than 2.0.0
    restart: unless-stopped
you can see three main things I have done to my docker-compose file (other than that, it is identical to the one at Github):
- I removed the MySQL dependency, I use the built-in HSQL DB within the container
- I added all the parameters from the Wiki page to JAVA_OPTS property right after existing ones
- I specified my own real folder which is mapped to the docker's /etc/unimus folder and that real folder is where I store the .p12 certificate as well.

Give it a try and let me know if you were able to make it work.
Post Reply