mumble-voip / mumble-docker

The official Mumble Docker image
BSD 3-Clause "New" or "Revised" License
144 stars 33 forks source link

MUMBLE_CUSTOM_CONFIG_FILE is ignored #47

Open Skyedra opened 6 days ago

Skyedra commented 6 days ago

I am having some trouble using a custom config file. I tried initially via docker compose, but I also tried using the command line syntax as documented on the main page:

root@warble:~# docker rm mumble-server 
mumble-server
root@warble:~# docker run --name mumble-server --volume /srv/mumble/data:/data -e "MUMBLE_CUSTOM_CONFIG_FILE='skye-config.ini'" mumblevoip/mumble-server:latest
ls: cannot access '/run/secrets': No such file or directory
Setting config "database" to: '/data/mumble-server.sqlite'
Setting config "ice" to: '"tcp -h 127.0.0.1 -p 6502"'
Setting config "welcometext" to: '"<br />Welcome to this server, running the official Mumble Docker image.<br />Enjoy your stay!<br />"'
Setting config "port" to: '64738'
Setting config "users" to: '100'
Running Mumble server as uid=10000 gid=10000
"/data" has the following permissions set:
  drwxr-xr-x, owner: "mumble" (UID: 10000), group: "mumble" (GID: 10000)
Command run to start the service : /usr/bin/mumble-server -fg -ini /data/mumble_server_config.ini
Starting...
<X>2024-10-29 07:12:40.322 SSL: OpenSSL version is 'OpenSSL 3.0.2 15 Mar 2022'
<W>2024-10-29 07:12:40.323 Initializing settings from /data/mumble_server_config.ini (basepath /data)
...

My docker compose looks similar:

services:
    mumble-server:
        image: mumblevoip/mumble-server:latest
        container_name: mumble-server
        hostname: mumble-server
        restart: on-failure
        volumes:
            - /srv/mumble/data:/data
        ports:
            - 64738:64738
            - 64738:64738/udp
        environment:
          MUMBLE_CUSTOM_CONFIG_FILE: 'skye-config.ini'

I tried with and without the apostrophes, but it didn't want to detect it. I can pass in other vars like MUMBLE_CONFIG_ICE and it picks up on those, but the custom config file seems to be ignored.

Gunzinger commented 1 day ago

Hi @Skyedra, I assume you have the skye-config.ini next to the docker-compose.yml?

In this case the MUMBLE_CUSTOM_CONFIG_FILE is resolved from within the mumble-server container, thus it would need to be at /srv/mumble/data/skye-config.ini.

Otherwise you need to do another volume passthrough for the configuration file in another location, e.g.:

       volumes:
            - /srv/mumble/data:/data
            - type: bind
              source: ./skye-config.ini
              target: /skye-config.ini
        ports:
            - 64738:64738
            - 64738:64738/udp
        environment:
          MUMBLE_CUSTOM_CONFIG_FILE: '/skye-config.ini'

See the implementation here for details (remember this runs inside of the container): https://github.com/mumble-voip/mumble-docker/blob/master/entrypoint.sh#L71

Hope that helps, happy mumbling :)

Skyedra commented 21 hours ago

Thank you for the reply; actually, it was located at /srv/mumble/data/skye-config.ini, next to other files that mumble can access:

# ls -lth /srv/mumble/data/
total 252K
-rw-r----- 1 10000 10000 224K Nov  4 02:02 mumble-server.sqlite
-rw-r--r-- 1 10000 10000  385 Oct 31 06:20 mumble_server_config.ini
-rw-r--r-- 1 root  root   177 Oct 29 10:15 welcome.txt
-rw-r--r-- 1 10000 10000  18K Oct 29 08:59 skye-config.ini

I had given up on the custom config and ended up configuring via the docker compose env vars (ex: MUMBLE_CONFIG_welcometextfile: "welcome.txt" etc). So resolving this issue is not a blocker for me, but still flagging as a potential bug in case anyone else happens upon it

(Other than that, mumble has been working well for my friend group, thanks ^.^)

Krzmbrzl commented 16 hours ago

If the value of the MUMBLE_CUSTOM_CONFIG_FILE parameter is not a file (as soon from inside the container), then it is ignored. Since in your case even though you set the parameter, the variable is ignored, that means that the path you are using can't be resolved from within the container. Maybe try using the absolute path /data/skye-config.ini :thinking: