services:

  laravel-docker:
    container_name: tpa
    build: 
      context: .
    working_dir: /var/www/html
    volumes:
      - ./:/var/www/html
    ports:
      - 8000:80
    depends_on:
      - mysql_db
  
  mysql_db:
    image: mysql:8.4.1
    env_file:
      - ./.env
    environment:
      MYSQL_DATABASE: ${DB_DATABASE}
      MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
      MYSQL_PASSWORD: ${DB_PASSWORD}
      MYSQL_ALLOW_EMPTY_PASSWORD: "Yes"
    ports:
    - 3307:3306
    volumes:
      - mysql_dev:/var/lib/mysql
  
  phpmyadmin:
    image: phpmyadmin:5.2-apache
    environment:
      - PMA_ARBITRARY=1
      - UPLOAD_LIMIT=400M
    depends_on:
      - mysql_db
    ports:
      - 9001:80

volumes:
  mysql_dev: