Volume change

Hi everyone,

Guys, I have a problem!
I want to install my Gladys instance on my OpenMediaVault. I have a dedicated disk volume and I wanted to install it there from a Portainer stack and therefore with Docker Compose.
I just wanted to change the volume variable:

  • /var/lib/gladysassistant:/var/lib/gladysassistant
    to
  • /path/to/my/disk/volume/gladysassistant:/var/lib/gladysassistant
    but
    during the configuration of the Zigbee2mqtt service the containers created by Gladys end up in /var/lib/gladysassistant.
    So I tried changing the volumes of these two containers after their creation but it didn’t work.

Any idea?
(For now I’m using the /var/lib/gladysassistant volume and everything’s fine!)

Thanks!

Hmm :thinking: That’s not normal, the code retrieves the bind that is configured for Gladys.

I’ll try to reproduce it. Which architecture are you on?

Can you post your compose/stack?

1 Like

Hi and thanks for your help!

Here is my compose:

version: "3.3"
services:
  gladys:
    image: gladysassistant/gladys:v4
    container_name: gladys
    restart: always
    network_mode: host
    privileged: true
    environment:
      NODE_ENV: production
      SQLITE_FILE_PATH: /var/lib/gladysassistant/gladys-production.db
      SERVER_PORT: "5425"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/lib/gladysassistant:/var/lib/gladysassistant
      #- ${ROOT}/gladysassistant:/var/lib/gladysassistant
      - /dev:/dev

I had also used my ROOT variable for the .db in the SQLITE_FILE_PATH.
The ROOT variable is: ROOT= /srv/dev-disk-by-uuid-5338eaab-600f-4cba-ba84-cdee7b15fd65/appdata

Architecture-wise I’m on an ESXi that hosts an OpenMediaVault on which Docker is installed.
I had another symptom: none of the configs were being saved; I think there’s a mixup between the two folders.

There you go!

For me it’s the environment variable SQLITE_FILE_PATH that defines which path to use.
Don’t forget that the container runs in privileged mode on the host OS, which can change behavior. For example, Gladys has access to the entire OS, unlike other containers.

@JulienB I don’t know if you were the one who created the GitHub issue and the PR, but there is indeed a problem in this part when docker-compose is used. So it’s not on your side — indeed, we currently don’t support docker-compose very well :slight_smile:

The GitHub issue:

The PR that fixes the bug:

@VonOx I’d appreciate your feedback on the PR :slight_smile:

I’m going to test it.

1 Like

Ah no, it’s not me! But I’ll take a look at that! Thanks.
I started working with the default config. I’ll run tests if there’s a solution before reverting to my volume.

HAHA I hadn’t

It’s most likely related

@JulienB the fix is live in Gladys Assistant v4.12.2

1 Like