services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: mangalore_app
    ports:
      - "8000:8000"
    volumes:
      - .:/var/www
    depends_on:
      - mysql
    env_file:
      - .env.docker

  mysql:
    image: mysql:8.0
    container_name: mangalore_mysql
    restart: always
    ports:
      - "3308:3306"
    environment:
      MYSQL_DATABASE: mangalore_store_api
      MYSQL_ROOT_PASSWORD: root
    volumes:
      - mysql_data:/var/lib/mysql

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: mangalore_phpmyadmin
    restart: always
    ports:
      - "8080:80"
    environment:
      PMA_HOST: mysql
      PMA_USER: root
      PMA_PASSWORD: root
    depends_on:
      - mysql

volumes:
  mysql_data: