version: '3'
services:
  app:
    container_name: kekranmekranwebsite
    build: .
    volumes:
      - ./app:/var/www/html
    ports:
      - 8082:80
    environment:
      - APP_ENV=local
      - APP_DEBUG=true
    networks:
      - kekranmekranwebsite
    depends_on:
      - db    

  db:
    image: mysql:5.7
    container_name: kekranmekranwebsitedb
    restart: unless-stopped
    environment:
      MYSQL_DATABASE: kekranmekranwebsitedb
      MYSQL_ROOT_PASSWORD: password
      MYSQL_USER: krishnan
      SERVICE_TAGS: dev
      SERVICE_NAME: mysql
    volumes:
      - kekranmekranwebsitedb:/var/lib/mysql
    ports:
      - 8083:3306
    networks:
      - kekranmekranwebsite

networks:
    kekranmekranwebsite:
        driver: bridge
volumes:
    kekranmekranwebsitedb:
        driver: local