|
|
3 년 전 | |
|---|---|---|
| .env.dist | 3 년 전 | |
| .gitignore | 3 년 전 | |
| README.md | 3 년 전 | |
| docker-compose.yml | 3 년 전 | |
| ipt.sh | 3 년 전 |
git clone https://gogs.halsbox.ru/hal/iczr-pbx.git pbx
cd pbx
cp .env.dist .env
cp app.env.dist app.env
Edit .env and app.env with your preffered editor.
Adjust environment variables for your needs.
The most important variables to set are:
| Variable | Description |
|---|---|
| PERSISTENT_STORAGE_PATH | Host path for persistent data storage |
| APP_FQDN | Domain name of the app |
| APP_AMI_HOST | IP address of host (by default Asterisk runs in host network mode) |
| APP_AMI_USERNAME | AMI username for the app |
| APP_AMI_SECRET | AMI password for the app |
| APP_AUTH_HEADER | HTTP header to use for the app auth |
| APP_AUTH_SECRET | Secret string to authorize access to the app |
| MYSQL_ROOT_PASSWORD | Set this to some secure password |
| MYSQL_PASSWORD | Set this to some secure password |
| FREEPBX_AMPMGRPASS | Password for Freepbx builtin AMI admin user, set it to some secure password |
| FREEPBX_CDRDBPASS | Set it to same value as MYSQL_PASSWORD |
| SENDMAIL_TG | Change to "true" if your want all mail from PBX to be forwarded to Telegram |
| TG_BOT_APIKEY | Create Telegram bot using BotFather and put your new bot API key here |
| TG_BOT_CHATID | Set destination Telegram User Id or Chat Id |
| HTTPD_HTTPS_ENABLED | Set to "true" to enable HTTPS for Freepbx |
| HTTPD_REDIRECT_HTTP_TO_HTTPS | Set to "true" to redirect HTTP requests to HTTPS |
| LETSENCRYPT_ENABLED | Set to "true" to automatically request and maintain LetsEncrypt cert for HTTPS |
| SMTP_MAIL_FROM | Change following to desired value. Not required if SENDMAIL_TG=true. |
| ROOT_MAILTO | Change following to desired value. Not required if SENDMAIL_TG=true. |
| FAIL2BAN_DEFAULT_DESTEMAIL | Change following to desired value. Not required if SENDMAIL_TG=true. |
| FAIL2BAN_DEFAULT_SENDER | Change following to desired value. Not required if SENDMAIL_TG=true. |
Run:
docker-compose build
Wait paitently until you see:
Successfully tagged halsbox/docker-freepbx:latest
If running for first time it can take long to build everything.
Run:
docker-compose up -d
Run:
docker-compose logs -f pbx
Watch pbx container initialization for errors and wait for:
fail2ban entered RUNNING state, process has stayed up for > than 5 seconds
Close container log output with Ctrl+C keys.
Restart container one extra time with docker-compose restart pbx if you set LETSENCRYPT_ENABLED to true.
git pull
docker-compose build
docker-compose up -d
docker-compose stop
docker compose rm
remove the PERSISTENT_STORAGE_PATH directory, e.g.:
rm -rf ./data
Repeat steps from Quick Start:
git pull
docker-compose build
docker-compose up -d