[Solved] Unimus Docker Database Config

Unimus support forum
Post Reply
Duncan
Posts: 3
Joined: Tue Feb 15, 2022 8:45 am

Tue Feb 15, 2022 9:00 am

I have run the docker-compose.yml file linked here > https://github.com/crocandr/docker-unim ... ompose.yml

I am not able to get the correct db config.

Database type: Mysql
Host: ? (assume docker ip address as no exposed ports from the compose file?)
Database name: ?
Database user: (assume one need to be created)
Database password: (assume one need to be created)
Encryption key: (assume one need to be created)

Please can someone assist?

TIA
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Tue Feb 15, 2022 1:37 pm

Duncan wrote:
Tue Feb 15, 2022 9:00 am
Please can someone assist?
Hi, happy to help. All the data is present in the compose file, in the DB container's section. Here is how the parts of the "db" container config map into Unimus config:

Code: Select all

  db:                                      <<< this is the name of the container, and should be used as the DB "Host" in Unimus. Docker will take care of translating this hostname to an internal docker IP
    image: mariadb
    command: --max_allowed_packet=268M
    environment:
      - MYSQL_ROOT_PASSWORD=supersecret
      - MYSQL_DATABASE=unimus              <<< this is the "Database name"
      - MYSQL_USER=unimus                  <<< this is the "Database user"
      - MYSQL_PASSWORD=secret              <<< and this is the "Database password"
      - TZ=Europe/Budapest
    volumes:
      - './db:/var/lib/mysql'
      - '/etc/localtime:/etc/localtime:ro'
    restart: unless-stopped
The "Encryption key" you need to generate / create yourself. Unimus will use this for data encryption before the data is written to the DB (more info in the left help panel in the Deploy Wizard).

Hope this helps.
Post Reply