Code Monkey home page Code Monkey logo

Comments (10)

flaviostutz avatar flaviostutz commented on July 22, 2024

The best is to use network mode host because SIP uses a lot of dynamic ports in listen mode and if you configure all those thousand of ports Docker will create a lot of rules (it will even get slower to launch the container). I tried this way before.
Unfortunately the default port on FreePBX is to use port 80 and with network_mode=host you will have conflict. Maybe we could create a way to change this port during startup based on a ENV parameter.

from freepbx.

mika-nt28 avatar mika-nt28 commented on July 22, 2024

Thank you for your help
I do not understand, how I can create with Docker a virtual network
I try as well but it does not work as I want sudo docker run --name freepbx --net bridge flaviostutz/freepbx

from freepbx.

flaviostutz avatar flaviostutz commented on July 22, 2024

In plain “docker run”, you have to use “—net host”.
In readme you can see a sample docker-compose.yml that works with network mode host. Please try it.

from freepbx.

mika-nt28 avatar mika-nt28 commented on July 22, 2024

I try your docker compose and it create 3 docker
image
But I understand the network netplan execution

from freepbx.

flaviostutz avatar flaviostutz commented on July 22, 2024

from freepbx.

mika-nt28 avatar mika-nt28 commented on July 22, 2024

no I don't understand netplan configuration

from freepbx.

flaviostutz avatar flaviostutz commented on July 22, 2024

netplan works only on the latest versions of Ubuntu.
The netplan configuration on readme is a sample when you a VoIP provider with a different IP in your network, so that you can reach it with static routing. If this is not your case, just ignore it and use your plain network configuration.

In this case, just run

docker-compose.yml

version: '3.3'
services:
  freepbx:
    image: flaviostutz/freepbx:14.0
    network_mode: host
    restart: always
    volumes:
      - freepbx-backup:/backup
      - freepbx-recordings:/var/spool/asterisk/monitor

volumes:
  freepbx-backup:
  freepbx-recordings:

docker-compose up -d

The image is already built in DockerHub, so you don’t need to rebuild it (I removed the build tag after your comments to easy running the container)

from freepbx.

mika-nt28 avatar mika-nt28 commented on July 22, 2024

Ok, I did it right, but my port 80 is already busy.
I Aurrais need to change this port is prossible with the Docker compose

from freepbx.

aBua-MUC avatar aBua-MUC commented on July 22, 2024

is there meanwhile a solution how the container can be operated as host and port 80 can be changed e.g. to 8080. I have already tried the following variant, but the Freepbx is not accessible under IP:8080.

version: '2'
services:
  freepbx-app:
    container_name: freepbx
    image: flaviostutz/freepbx
    network_mode: "host"
    volumes:
      - /volume1/docker/asterisk/certs:/certs
      - /volume1/docker/asterisk/data:/data
      - /volume1/docker/asterisk/logs:/var/log
      - /volume1/docker/asterisk/html:/var/www/html

    environment: 
      - HTTP_PORT=8080
      - ZABBIX_HOSTNAME=freepbx-app
      - RTP_START=18000
      - RTP_FINISH=18500
    restart: always

from freepbx.

flaviostutz avatar flaviostutz commented on July 22, 2024

from freepbx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.