version: "3.8"
services:
  asterisk:
    image: mathewfrancisv/odbc_mariadb:v2.0.1
    container_name: mat_asterisk
    restart: always
    tty: true
    depends_on: 
      - mariadb
    volumes:
      - ./conf/odbc.ini:/etc/odbc.ini
      - ./conf/odbcinst.ini:/etc/odbcinst.ini
      - ./conf/asterisk/:/etc/asterisk/
      - ./recordings:/var/spool/asterisk/monitor #for call recording 
    network_mode: "host"

  mariadb:
    image: mariadb
    container_name: mat_mariadb
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: rootpassword
      MYSQL_DATABASE: asterisk_db
      MYSQL_USER: asterisk_user
      MYSQL_PASSWORD: 12345
      MYSQL_TCP_PORT: 3308
    volumes:
      - ./mariadb_data:/var/lib/mysql      # Persistent data
    network_mode: "host"

    #