Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dev/.env
10 changes: 10 additions & 0 deletions dev/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## for Asterisk only
AMI_HOST=155.138.131.82
AMI_PORT=5038
AMI_USER=ami
AMI_PASS=123

ARI_USERNAME=ariuser
ARI_PASSWORD=myaripassword

LINEBLOCS_KEY=123
63 changes: 63 additions & 0 deletions dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Use Docker Compose to develop lineblocs - asterisk

## Structure of directory
```shell
.
.
├── configs
├── dev
| ├── docker-compose.yaml
| ├── .env
| └── README.md
├── Dockerfile
├── entrypoint.sh
└── irontec.list
```

## Simple running
```shell
$ git clone https://github.com/Lineblocs/asterisk.git
$ cd asterisk/dev
$ cp .env.example .env
$ docker compose up -d
```

## Advance running

### Clone asterisk project
Clone docker compose and move to directory.
```shell
$ git clone https://github.com/Lineblocs/asterisk.git
$ cd asterisk/dev
```

### Make .env file and confige
```shell
$ cp .env.example .env
```
`AMI_HOST`
`AMI_PORT`
`AMI_USER`
`AMI_PASS`

`ARI_USERNAME`
`ARI_PASSWORD`

`LINEBLOCS_KEY`


### create container
Create and run container with this command below.

```shell
$ docker compose up -d
```

### Useful command
Check node log `docker logs -f lineblocs-asterisk`

Log in to terminal of container -> `docker exec -it lineblocs-asterisk bash`

Modify asterisk project under `asterisk` directory

After change configuration, Please run `docker compose restart`
26 changes: 26 additions & 0 deletions dev/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "3.6"
x-logging: &default-logging
options:
max-size: "100m"
max-file: "5"
driver: json-file
services:
asterisk:
build:
context: ..
dockerfile: Dockerfile
image: lineblocs-asterisk
volumes:
- ../configs:/etc/asterisk/
logging: *default-logging
container_name: lineblocs-asterisk
restart: unless-stopped
environment:
- AMI_USER=${AMI_USER}
- AMI_PASS=${AMI_PASS}
- AMI_PORT=${AMI_PORT}
- AMI_HOST=${AMI_HOST}
- ARI_USERNAME=${ARI_USERNAME}
- ARI_PASSWORD=${ARI_PASSWORD}
- LINEBLOCS_KEY=${LINEBLOCS_KEY}
network_mode: "host"