version: "3"

services:
  app:
    build: .
    ports:
      - "80:80"
    container_name: ${APP_NAME}-app
    restart: always
    volumes:
      - ${APP_DIR}:/var/www/html
      - ./php.ini-development:/usr/local/etc/php/php.ini
      - ./.runtime/logs/apache:/var/log/apache2
    links:
      - ${DB_HOST}
      - ${MAIL_LINK}

  dbhost:
    image: mariadb
    container_name:  ${APP_NAME}-dbhost
    environment:
      - MYSQL_ROOT_PASSWORD=${DB_PASS}
      - MYSQL_DATABASE=${DB_BASE}
      - MYSQL_USER=${DB_USER}
      - MYSQL_PASSWORD=${DB_PASS}
    volumes:
      - ./.runtime/mysql:/var/lib/mysql

  dbadmin:
    image: phpmyadmin/phpmyadmin
    container_name:  ${APP_NAME}-dbadmin
    environment:
      - PMA_HOST=${DB_HOST}
      - PMA_USER=${DB_USER}
      - PMA_PASSWORD=${DB_PASS}
      - PHP_UPLOAD_MAX_FILESIZE=1G
      - PHP_MAX_INPUT_VARS=1G
    restart: always
    ports:
     - 8001:80
    volumes:
     - /sessions

  mail:
    image: mailhog/mailhog
    container_name:  ${APP_NAME}-mail
    restart: always
    ports:
      - "1025:1025"
      - "8025:8025"

version: "3"

services:
  app:
    build: .
    ports:
      - "80:80"
    container_name: ${APP_NAME}-app
    restart: always
    volumes:
      - ${APP_DIR}:/var/www/html
      - ./php.ini-development:/usr/local/etc/php/php.ini
      - ./.runtime/logs/apache:/var/log/apache2
    links:
      - ${DB_HOST}
      - ${MAIL_LINK}

  dbhost:
    image: mariadb
    container_name:  ${APP_NAME}-dbhost
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=${DB_PASS}
      - MYSQL_DATABASE=${DB_BASE}
      - MYSQL_USER=${DB_USER}
      - MYSQL_PASSWORD=${DB_PASS}
    volumes:
      - ./.runtime/mysql:/var/lib/mysql

  dbadmin:
    image: phpmyadmin/phpmyadmin
    container_name:  ${APP_NAME}-dbadmin
    environment:
      - PMA_HOST=${DB_HOST}
      - PMA_USER=${DB_USER}
      - PMA_PASSWORD=${DB_PASS}
      - PHP_UPLOAD_MAX_FILESIZE=1G
      - PHP_MAX_INPUT_VARS=1G
    restart: always
    ports:
     - 8001:80
    volumes:
     - /sessions

  mail:
    image: mailhog/mailhog
    container_name:  ${APP_NAME}-mail
    restart: always
    ports:
      - "1025:1025"
      - "8025:8025"

Add dbhost ports for connection local
Add dbhost ports for connection local