fonoster / routr

⚡ The future of programmable SIP servers.

Home Page:https://routr.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue mounting volumes with docker-compose.yaml

Bonanzameh opened this issue · comments

Hello,

I'm having issues with mounting a persistent volume for configuration purposes.
The compose yaml looks like this;

  routr:
    image: fonoster/routr
    container_name: routr
    ports:
      - 4567:4567
      - 5060:5060
      - 5060:5060/udp
      - 5061:5061
      - 5062:5062
      - 5063:5063
    environment:
      - TZ=Europe/Brussels
    restart: unless-stopped
    volumes: 
      - /opt/routr/config:/opt/routr/config

and results in this error:
ERROR StatusLogger File not found in file system or classpath: config/log4j2.yml
ERROR StatusLogger Reconfiguration failed: No configuration found for '67424e82' at 'null' in 'null'

Changing the (container) volume to anything else will allow the contaire to spin up fine, though without access to the config files from the host mount.

Having all files manually copied and pasted in the opt/routr/config dir on the host yields the following error:
15:31:39.999 [main] ERROR io.routr.core.Launcher - Unable to open configuration file [INFO tini (1)] Spawned child process './routr' with pid '7' [INFO tini (1)] Main child exited normally (with status '0')`
This location is drwxrwxrwx including subdirs. and explicitely so for the log4j2.yml file.

I tried manual compose file; manual installations too.

Docker version 20.10.22, build 3a2c30b
Docker Compose version v2.14.1
On Ubuntu 22.04.1 LTS

I'm sure i'm missing something silly but I can't seem to figure it out on my own. Can you please help?

thanks.

I use this docker-compose

version: "3"
services:
  fonoster-server:
      image: fonoster/routr:1.2.2
      ports:
        - "4567:4567"
        - "5060:5060"
        - "5060:5060/udp"
        - "5061-5063:5061-5063/tcp"
      environment:
        EXTERN_ADDR: 172.20.10.2
      networks:
        - fonoster-nw
networks:
  fonoster-nw:
    driver: bridge

Thanks for helping in my troubleshooting.
You compose code spins up the same; however I see no volume mounts to the routr config dir either.

Can you tell me; how do you make (persistent) config changes?

I see two options;

  • RCTL (but that is not persistent: and I could just as well edit the yml files via console.
  • 'hardcode' the config and create a new image

For further info: the use case for me is to be able to connect a Behnke SIP doorbell; and have a softphone in home assistant for two way comms and door control via key presses. It all works fine, but the changes I make are never persistent (which would be preferrable in case of reboots/restores) and I would like to know what the best/good practise would be for my scenario.

Thanks!

@Bonanzameh 👋

It feels like a permission issue, but I cannot reproduce it on my Mac or Linux machine. I tried your config, unchanged, and it worked perfectly.

routr

Would you re-post this at Discussions or Discord? So far, it seems like a Docker issue rather than Routr.

I'm closing this for now. However, feel free to re-open if it is a bug with Routr.