-
Notifications
You must be signed in to change notification settings - Fork 75
/
compose.yml
117 lines (113 loc) · 4.1 KB
/
compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# NOTE: don't edit this file, instead specify your changes creating docker-compose.override.yml
networks:
izpbx:
driver: bridge
## if you want run other izpbx deploy in the same docker host enable the macvlan interface driver
#izpbx-ext:
#driver: macvlan
#driver_opts:
#parent: eth0
#ipam:
#config:
#- subnet: 10.1.1.0/24
# secrets:
# IZPBX_MYSQL_ROOT_PASSWORD:
# environment: MYSQL_ROOT_PASSWORD
# IZPBX_MYSQL_PASSWORD:
# environment: MYSQL_PASSWORD
services:
# https://hub.docker.com/_/mariadb?tab=tags&page=1&ordering=last_updated
db:
# current LTS (Long Term Support) release
image: docker.io/mariadb:10.11.8
# previous LTS (Long Term Support) release
#image: docker.io/mariadb:10.6.14
container_name: izpbx-db
## WARNING: if you upgrade image tag enter the container and run mysql_upgrade:
## source .env ; docker exec -it izpbx-db mysql_upgrade -u root -p$MYSQL_ROOT_PASSWORD
command: --sql-mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
restart: unless-stopped
env_file:
- .env
environment:
- TZ
- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD
## NOTE: using secrets files need further testing
#- MYSQL_PASSWORD_FILE=/run/secrets/IZPBX_MYSQL_PASSWORD
#- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/IZPBX_MYSQL_ROOT_PASSWORD
#- MARIADB_RANDOM_ROOT_PASSWORD=${MYSQL_RANDOM_ROOT_PASSWORD}
#- MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=${MYSQL_ALLOW_EMPTY_ROOT_PASSWORD}
#secrets:
#- IZPBX_MYSQL_PASSWORD
#- IZPBX_MYSQL_ROOT_PASSWORD
volumes:
#- /etc/localtime:/etc/localtime:ro
- ./data/db:/var/lib/mysql
## NOTE: to avoid nat management use: 'network_mode: host'
#network_mode: host
## WARNING: if 'network_mode: host' is disabled, comment out the following lines
networks:
izpbx:
## WARNING: if not commented out, the database will be exposed outside the container
ports:
- ${APP_PORT_MYSQL}:3306
# https://hub.docker.com/r/izdock/izpbx-asterisk/tags?page=1&ordering=last_updated
izpbx:
image: docker.io/izdock/izpbx-asterisk:20.16.16
container_name: izpbx
#entrypoint: /bin/bash -c "/bin/bash -c \"sleep 3600\""
#hostname: ${APP_FQDN}
restart: unless-stopped
depends_on:
- db
env_file:
- .env
#secrets:
#- IZPBX_MYSQL_PASSWORD
#- IZPBX_MYSQL_ROOT_PASSWORD
volumes:
#- /etc/localtime:/etc/localtime:ro
- ./data/izpbx:/data
## fail2ban need privileged mode to manage iptables
cap_add:
- NET_ADMIN
#security_opt:
#- seccomp=unconfined
privileged: true
ulimits:
nofile:
soft: 8192
hard: 32768
## NOTE: to avoid SIP-RTP NAT issues use: 'network_mode: host'
network_mode: host
## WARNING: if 'network_mode: host' is disabled, comment out the following lines
## ports are not needed if using 'network_mode: host' or macvlan network driver
## if you want use macvlan network driver comment out 'izpbx-ext:' too and change exposed IP according your needs
#networks:
# izpbx:
# izpbx-ext:
# ipv4_address: 10.1.1.221
#ports:
#- ${APP_PORT_HTTP}:${APP_PORT_HTTP}
#- ${APP_PORT_HTTPS}:${APP_PORT_HTTPS}
#- ${APP_PORT_IAX}:${APP_PORT_IAX}
#- ${APP_PORT_IAX}:${APP_PORT_IAX}/udp
#- ${APP_PORT_PJSIP}:${APP_PORT_PJSIP}
#- ${APP_PORT_PJSIP}:${APP_PORT_PJSIP}/udp
#- ${APP_PORT_SIP}:${APP_PORT_SIP}/udp
#- ${APP_PORT_SIP}:${APP_PORT_SIP}
#- ${APP_PORT_WEBRTC}:${APP_PORT_WEBRTC}
#- ${APP_PORT_UCP_HTTP}:${APP_PORT_UCP_HTTP}
#- ${APP_PORT_UCP_HTTPS}:${APP_PORT_UCP_HTTPS}
#- ${APP_PORT_AMI}:${APP_PORT_AMI}
#- ${APP_PORT_RTP_START}-${APP_PORT_RTP_END}:${APP_PORT_RTP_START}-${APP_PORT_RTP_END}
#- ${APP_PORT_RTP_START}-${APP_PORT_RTP_END}:${APP_PORT_RTP_START}-${APP_PORT_RTP_END}/udp
#- ${APP_PORT_DHCP}:${APP_PORT_DHCP}/udp
#- ${APP_PORT_TFTP}:${APP_PORT_TFTP}
#- ${APP_PORT_TFTP}:${APP_PORT_TFTP}/udp
#- ${APP_PORT_NTP}:${APP_PORT_NTP}/udp
#- ${APP_PORT_FOP2}:${APP_PORT_FOP2}
#- ${APP_PORT_ZABBIX}:${APP_PORT_ZABBIX}