version: '3'
services:
  db:
    image: mysql:latest
    environment:
      MYSQL_DATABASE: shabushabu
      MYSQL_USER: shabushabu
      MYSQL_PASSWORD: qwerty
      MYSQL_ALLOW_EMPTY_PASSWORD: 1
    volumes:
      - "./db:/docker-entrypoint-initdb.d"
    networks:
      - shabushabu
  www:
    depends_on:
      - db
    build:
      context: ./
      dockerfile: Dockerfile
    volumes:
      - "./:/var/www/html"    
    ports: 
      - 80:80
      - 443:443
    networks:
      - shabushabu

  phpmyadmin:
    depends_on:
      - db
    image: phpmyadmin/phpmyadmin
    ports:
      - 8001:80
    environment:
      PMA_HOST: db
      PMA_PORT: 3306
    networks:
      - shabushabu

networks:
  shabushabu:
    driver: bridge
