mumble-voip / mumble-docker

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

All config environment variables are ignored #24

Closed BorisBrock closed 1 year ago

BorisBrock commented 2 years ago

I run the mumble server with this docker compose file:

services:
  murmur:
    container_name: murmur
    image: mumblevoip/mumble-server:latest
    restart: always
    ports:
      - "49155:50051/tcp"
      - "64738:64738/tcp"
      - "64738:64738/udp"
    environment:
      MUMBLE_CONFIG_SERVER_PASSWORD: "mypassword"
      MUMBLE_CONFIG_WELCOME_TEXT: "My Welcome Text"
      MUMBLE_CONFIG_USERS: "8"
      MUMBLE_CONFIG_BANDWIDTH: "128000"

None of the settings seem to work. E.g. the log file shows:

Setting config "database" to: '/data/murmur.sqlite' Setting config "ice" to: '"tcp -h 127.0.0.1 -p 6502"' Setting config "welcometext" to: '"
Welcome to this server, running the official Mumble Docker image.
Enjoy your stay!
"' Setting config "port" to: '64738' Setting config "users" to: '100' Running Mumble server as uid=1000 gid=1000 "/data" has the following permissions set: drwxr-xr-x, owner: "mumble" (UID: 1000), group: "users" (GID: 100) Command run to start the service : /usr/bin/mumble-server -fg -ini /data/mumble_server_config.ini Starting...

As you can see the welcome text is not what was configured.

Krzmbrzl commented 2 years ago

@azlux do you have an idea? I don't have any experience with docker compose.

@BorisBrock could you try running the container manually to see if the result remains the same?

BorisBrock commented 2 years ago

@Krzmbrzl Starting the container without Docker Compose actually works. In that case the environment variables are applied as expected.

Krzmbrzl commented 2 years ago

Interesting. In that case my suspicion would be that for some reason docker compose doesn't set the environment variables as expected :thinking:

azlux commented 2 years ago

@BorisBrock Do you find your ENV into the output of docker inspect <container runn ID (can be found with docker ps | grep mumble)>

restitux commented 2 years ago

Shouldn't the environment variable be MUMBLE_CONFIG_WELCOMETEXT not MUMBLE_CONFIG_WELCOME_TEXT (note the removed space)?

Krzmbrzl commented 2 years ago

Additional underscores in the variable names are ignored (see README)

rastacalavera commented 2 years ago

Hello,

I tried a modification of @BorisBrock and the welcome message works fine, but I had issues with a volume mount and default channels.

When I try to bring the container up, I get a permission error of:

2022-10-06T02:25:12.742473486Z /entrypoint.sh: line 77: /data/mumble_server_config.ini: Permission denied
2022-10-06T02:25:20.061774974Z /entrypoint.sh: line 77: /data/mumble_server_config.ini: Permission denied

My host user has the ID of 1000 and I even specified the PUID/GUID in the compose file but it still makes everything as root.

So then for testing, I sudo chmod 777 data/mumble and everything starts to work but there are no other channels than root.

My compose file is shown below:

services:
  murmur:
    container_name: murmur
    image: mumblevoip/mumble-server:latest
    restart: unless-stopped
    ports:
      - "49155:50051/tcp"
      - "64738:64738/tcp"
      - "64738:64738/udp"
    environment:
       MUMBLE_CONFIG_SERVER_PASSWORD: "mypassword"
       MUMBLE_CONFIG_WELCOME_TEXT: "Howdy Ya'll This is a Mumble Server"
       MUMBLE_CONFIG_USERS: "8"
       MUMBLE_CONFIG_BANDWIDTH: "128000"
       MUMBLE_CONFIG_channelname: "lobby"
       MUMBLE_CONFIG_channelname: "hello"
       MUMBLE_CONFIG_defaultchannel: "2"
       PUID: "1000"
       GUID: "1000"
    volumes:
      - "./data/mumble:/data:rw"
Krzmbrzl commented 2 years ago

but there are no other channels than root.

Yes that is to be expected. You can't add channels via the INI file. That's currently a limitation of the Mumble server config system and unrelated to the Docker image itself.

As for why everything is created as root, idk :shrug:

TBhimdi commented 2 years ago

My host user has the ID of 1000 and I even specified the PUID/GUID in the compose file but it still makes everything as root.

Had the same Permission Denied issue. I don't know if the MUMBLE_UID/MUMBLE_GID environment variables work (I excluded them after realizing that). Since I already had my host user as 1000/1000, I set MUMBLE_CONFIG_UNAME as the same host username and the volume bind started working correctly. No chmod necessary.

Having a working MUMBLE_UID/MUMBLE_GID and being able to set a timezone, all using environment variables, would be a welcome change.

Krzmbrzl commented 2 years ago

The UID and GID options are for building the image only. Are you aware of that?

TBhimdi commented 2 years ago

The UID and GID options are for building the image only. Are you aware of that?

I was not. Then I assume the PUID/GUID options in the above compose file wouldn't work either?

Krzmbrzl commented 2 years ago

I don't know what these options are and how they are supposed to work. What I can tell you is that afaik these options are not handled by our docker image. Whatever they do, they have to be handled elsewhere :eyes:

Krzmbrzl commented 1 year ago

Closing this as resolved