Advertisement
Guest User

Untitled

a guest
Dec 20th, 2018
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.77 KB | None | 0 0
  1. version: '2'
  2.  
  3. services:
  4.   freepbx-app:
  5.     container_name: freepbx-app
  6.     image: tiredofit/freepbx
  7.     ports:
  8.     #### If you aren't using a reverse proxy
  9.       - 80:80
  10.      #### If you want SSL Support and not using a reverse proxy
  11.       - 443:443
  12.       - 5060:5060
  13.       - 5160:5160
  14.       - 18000-18100:18000-18100/udp
  15.      #### Flash Operator Panel
  16.       - 4445:4445
  17.     volumes:
  18.      - ./certs:/certs
  19.       - ./data:/data
  20.       - ./logs:/var/log
  21.       - ./data/www:/var/www/html
  22.      ### Only Enable this option below if you set DB_EMBEDDED=TRUE
  23.      #- ./db:/var/lib/mysql
  24.      ### You can drop custom files overtop of the image if you have made modifications to modules/css/whatever - Use with care
  25.      #- ./assets/custom:/assets/custom
  26.  
  27.     environment:
  28.       - VIRTUAL_HOST=hostname.example.com
  29.       - VIRTUAL_NETWORK=nginx-proxy
  30.      ### If you want to connect to the SSL Enabled Container
  31.      #- VIRTUAL_PORT=443
  32.      #- VIRTUAL_PROTO=https
  33.       - VIRTUAL_PORT=80
  34.       - LETSENCRYPT_HOST=hostname.example.com
  35.       - LETSENCRYPT_EMAIL=email@example.com
  36.  
  37.       - ZABBIX_HOSTNAME=freepbx-app
  38.  
  39.       - RTP_START=18000
  40.       - RTP_FINISH=18100
  41.    
  42.      ## Use for External MySQL Server
  43.       - DB_EMBEDDED=FALSE
  44.  
  45.      ### These are only necessary if DB_EMBEDDED=FALSE
  46.       - DB_HOST=freepbx-db
  47.       - DB_PORT=3306
  48.       - DB_NAME=asterisk
  49.       - DB_USER=asterisk
  50.       - DB_PASS=asteriskpass
  51.    
  52.      ### If you are using TLS Support for Apache to listen on 443 in the container drop them in /certs and set these:
  53.      #- TLS_CERT=cert.pem
  54.      #- TLS_KEY=key.pem
  55.      
  56.     restart: always
  57.     networks:
  58.      - proxy-tier
  59.  
  60.     ### These final lines are for Fail2ban. If you don't want, comment and also add ENABLE_FAIL2BAN=FALSE to your environment
  61.     cap_add:
  62.      - NET_ADMIN
  63.     privileged: true
  64.  
  65.   freepbx-db:
  66.     container_name: freepbx-db
  67.     image: tiredofit/mariadb
  68.     restart: always
  69.     volumes:
  70.      - ./db:/var/lib/mysql
  71.     environment:
  72.      - MYSQL_ROOT_PASSWORD=password
  73.       - MYSQL_DATABASE=asterisk
  74.       - MYSQL_USER=asterisk
  75.       - MYSQL_PASSWORD=asteriskpass
  76.     networks:
  77.      - proxy-tier
  78.  
  79.   freepbx-db-backup:
  80.     container_name: freepbx-db-backup
  81.     image: tiredofit/db-backup
  82.     links:
  83.     - freepbx-db
  84.     volumes:
  85.      - ./dbbackup:/backup
  86.     environment:
  87.      - ZABBIX_HOSTNAME=freepbx-db-backup
  88.       - DB_HOST=freepbx-db
  89.       - DB_TYPE=mariadb
  90.       - DB_NAME=asterisk
  91.       - DB_USER=asterisk
  92.       - DB_PASS=asteriskpass
  93.       - DB_DUMP_FREQ=1440
  94.       - DB_DUMP_BEGIN=0000
  95.       - DB_CLEANUP_TIME=8640
  96.       - COMPRESSION=BZ
  97.       - MD5=TRUE
  98.     networks:
  99.      - proxy-tier
  100.     restart: always
  101.  
  102. networks:
  103.   proxy-tier:
  104.     external:
  105.       name: nginx-proxy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement