version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: brt
    ports:
      - "5701:80"
    volumes:
      - .:/var/www/html
    depends_on:
      - db
    command: bash -c "docker-php-ext-install pdo pdo_mysql && apache2-foreground"
    networks:
      - brt
  db:
    image: mysql:5.7
    container_name: mysql_brt
    environment:
      MYSQL_ROOT_PASSWORD: 'o81wnbV#JEXBevd=5hL='
      MYSQL_DATABASE: brt_nordeste
    ports:
      - "3308:3306"
    networks:
      - brt

  phpmyadmin:
    depends_on:
      - db
    image: phpmyadmin
    restart: always
    ports:
      - "8091:80"
    environment:
      PMA_HOST: db
      MYSQL_ROOT_PASSWORD: 'o81wnbV#JEXBevd=5hL='
      UPLOAD_LIMIT: 100M
    networks:
      - brt

networks:
  brt:
    driver: bridge
