Giter VIP home page Giter VIP logo

Comments (7)

tiredofit avatar tiredofit commented on May 17, 2024

Here's what we use with great success.

version: '2.1'

services:
  redacted-nginx-proxy:
    image: nginx-proxy:938d638e5c4d0dd98105bb15838cb5481de70a80
    container_name: redacted-nginx-proxy
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./conf/vhost.d:/etc/nginx/vhost.d
      - ./conf/html:/usr/share/nginx/html
      - ./conf/certs:/etc/nginx/certs:ro
      - ./logs:/var/log/nginx
      - /var/run/docker.sock:/tmp/docker.sock:ro
    environment:
      - ZABBIX_HOSTNAME=redacted-nginx-proxy
    networks:
      - proxy-tier
    restart: always
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"


  redacted-letsencrypt-companion:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: redacted-letsencrypt-companion
    volumes_from:
      - redacted-nginx-proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./conf/certs:/etc/nginx/certs:rw
    restart: always
  
networks:
  proxy-tier:
    external:
      name: nginx-proxy

from docker-freepbx.

jacobpdq avatar jacobpdq commented on May 17, 2024

Thanks. And just before I pull the trigger, does this make sense

version: '2'

services:
  freepbx-app:
    container_name: freepbx-app
    image: tiredofit/freepbx
    ports:
     #### If you aren't using a reverse proxy
     #- 80:80
     #### If you want SSL Support and not using a reverse proxy
     #- 443:443
      - 5060:5060
      - 5160:5160
      - 18000-18100:18000-18100/udp
    volumes:
      - ./certs:/certs
      - ./data:/data
      - ./logs:/var/log
      - ./data/www:/var/www/html
     ### Only Enable this option below if you set DB_EMBEDDED=TRUE
     #- ./db:/var/lib/mysql

    environment: 
      - VIRTUAL_HOST=████
      - VIRTUAL_NETWORK=nginx-proxy
     ### If you want to connect to the SSL Enabled Container 
     #- VIRTUAL_PORT=443
     #- VIRTUAL_PROTO=https
      - VIRTUAL_PORT=80
      - LETSENCRYPT_HOST=████
      - LETSENCRYPT_EMAIL=████

      - ZABBIX_HOSTNAME=freepbx-app

      - RTP_START=18000
      - RTP_FINISH=18100
    
     ## Use for External MySQL Server
     #- DB_EMBEDDED=FALSE

     ### These are only necessary if DB_EMBEDDED=FALSE
      #- DB_HOST=freepbx-db
      #- DB_PORT=3306
      #- DB_NAME=asterisk
      #- DB_USER=asterisk
      #- DB_PASS=asteriskpass
    
     ### If you are using TLS Support for Apache to listen on 443 in the container drop them in /certs and set these:
     #- TLS_CERT=cert.pem
     #- TLS_KEY=key.pem
     
    restart: always
    networks:
      - proxy-tier
    ### These final lines are for Fail2ban. If you don't want, comment and also add ENABLE_FAIL2BAN=FALSE to your environment
    cap_add:
      - NET_ADMIN
    privileged: true

  freepbx-db:
    container_name: freepbx-db
    image: tiredofit/mariadb
    restart: always
    volumes:
      - ./db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=password
      - MYSQL_DATABASE=asterisk
      - MYSQL_USER=asterisk
      - MYSQL_PASSWORD=asteriskpass
    networks:
      - proxy-tier

  freepbx-db-backup:
    container_name: freepbx-db-backup
    image: tiredofit/db-backup
    links:
     - freepbx-db
    volumes:
      - ./dbbackup:/backup
    environment:
      - ZABBIX_HOSTNAME=freepbx-db-backup
      - DB_HOST=freepbx-db
      - DB_TYPE=mariadb
      - DB_NAME=asterisk
      - DB_USER=asterisk
      - DB_PASS=asteriskpass
      - DB_DUMP_FREQ=1440
      - DB_DUMP_BEGIN=0000
      - DB_CLEANUP_TIME=8640
      - COMPRESSION=BZ
      - MD5=TRUE
    networks:
      - proxy-tier
    restart: always

networks:
  proxy-tier:
    external:
      name: nginx-proxy

from docker-freepbx.

jacobpdq avatar jacobpdq commented on May 17, 2024

edit: commented 80

... do I have to use expose: - 80?

from docker-freepbx.

tiredofit avatar tiredofit commented on May 17, 2024

Looks like you are going to use the embedded DB, so you'll want to uncomment the part where it says:

### Only Enable this option below if you set DB_EMBEDDED=TRUE
     #- ./db:/var/lib/mysql

You'll want to get rid of the containers (freepbx-db and freepbx-db-backup) though. I use the external DB (non embedded) and added it the internal DB feature "because I could", but don't have much experience with using it in this docker image. Personally I like to seperate them.

from docker-freepbx.

jacobpdq avatar jacobpdq commented on May 17, 2024

I see. I guess I should set that up and stick with what works, then. Thanks +1+1

from docker-freepbx.

tiredofit avatar tiredofit commented on May 17, 2024

Good luck! We're succesfully using this on a development server (calling working, webrtc phone working) with a planned usage case of over 500 extensions in the next 60 days, so updates to this image will come in bursts as I add more settings. I'm currently on the hunt on how to get LDAP authentication to work for the user manager and plan to have an ability to inject custom themes / tweaks without having to modify the image shortly. Also, I usually build complicated images in Debian first and then switch over to Alpine after the fact. The Alpine image is 80% complete and 1/4 of the size..

from docker-freepbx.

jacobpdq avatar jacobpdq commented on May 17, 2024

Very cool. No matter for me since I have 2 extensions and at most ~5 concurrent calls. Keep up the good work – I'll let you know if I have any questions; many thanks for answering

from docker-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.