

networks:
  laravel:
    driver: bridge

services:
  app:
    image: laravelsail/php81-composer # Use PHP 8.1 Sail Image
    ports:
      - "8000:8000"
    volumes:
      - .:/var/www/html
    working_dir: /var/www/html
    depends_on:
      - db
      - redis
    networks:
      - laravel

  db:
    image: mysql:8.0
    platform: linux/amd64
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: app
      MYSQL_USER: user
      MYSQL_PASSWORD: password
    ports:
      - "3306:3306"
    networks:
      - laravel

  redis:
    image: redis:alpine
    platform: linux/amd64
    ports:
      - "6379:6379"
    networks:
      - laravel

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    platform: linux/amd64
    ports:
      - "8080:80"
    environment:
      PMA_HOST: db
      MYSQL_ROOT_PASSWORD: root
    networks:
      - laravel
