version: '3.9'

services:
  whistler:
    build: .
    volumes:
      - .:/app
    depends_on:
      -   whistler-db
    ports:
      - 8040:8040
      - 3133:3133
    restart: always
    networks:
      - default
      - kafka_network
  whistler-db:
    image: mysql:8
    restart: always
    environment:
      MYSQL_DATABASE: whistler
      MYSQL_ROOT_PASSWORD: root
      MYSQL_PASSWORD: root
    volumes:
      - ./storage/dbdata:/var/lib/mysql
    ports:
      - 33046:3306
    networks:
      - default
  whistler-supervisor:
    build:
      context: .
    container_name: whistler-supervisor
    volumes:
     - ./src:/app

    networks:
      - default
  whistler-phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: whistler-phpmyadmin
    links:
      - whistler-db
    environment:
      PMA_HOST: whistler-db
      PMA_PORT: 3306
      PMA_ARBITRARY: 1
    restart: always
    ports:
      - 8042:80
networks:
  kafka_network:
    external:
      name: kafka_docker
  default:
