version: "3.8"

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: extranetwork_app
    restart: unless-stopped
    working_dir: /var/www/html
    volumes:
      - .:/var/www/html
      - extranetwork_uploads_data:/home/uploads
    ports:
      - "8073:80"
    depends_on:
      - mysql
    networks:
      - extranetwork_network

  mysql:
    image: mysql:8.0
    container_name: extranetwork_mysql
    restart: unless-stopped
    ports:
      - "3307:3306"
    environment:
      MYSQL_DATABASE: extranetwork_api
      MYSQL_ROOT_PASSWORD: "144652qweBk??"
    command: --default-authentication-plugin=mysql_native_password
    volumes:
      - extranetwork_mysql_data:/var/lib/mysql
    networks:
      - extranetwork_network

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: extranetwork_phpmyadmin
    restart: unless-stopped
    ports:
      - "8081:80"
    environment:
      PMA_HOST: mysql
      PMA_PORT: 3306
      PMA_USER: root
      PMA_PASSWORD: "144652qweBk??"
    depends_on:
      - mysql
    networks:
      - extranetwork_network

volumes:
  extranetwork_mysql_data:
  extranetwork_uploads_data:

networks:
  extranetwork_network:
    driver: bridge
