version: '3.8'

services:
  mysql:
    image: mysql:8.0
    container_name: company_profile_db
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: root_password
      MYSQL_DATABASE: company_profile
      MYSQL_USER: laravel
      MYSQL_PASSWORD: laravel_password
    ports:
      - "3307:3306"
    volumes:
      - mysql_data:/var/lib/mysql
    networks:
      - company_profile_network
    command: --default-authentication-plugin=mysql_native_password

  phpmyadmin:
    image: phpmyadmin:latest
    container_name: company_profile_pma
    restart: unless-stopped
    environment:
      PMA_HOST: mysql
      PMA_USER: laravel
      PMA_PASSWORD: laravel_password
    ports:
      - "8081:80"
    depends_on:
      - mysql
    networks:
      - company_profile_network

volumes:
  mysql_data:

networks:
  company_profile_network:
    driver: bridge
