version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    image: laravel-app
    container_name: laravel-app
    ports:
      - "8000:80"
    volumes:
      - .:/var/www/html
    environment:
      - APP_ENV=local
      - APP_DEBUG=true
      - APP_KEY
      - DB_HOST=db
      - DB_PORT=3306
      - DB_DATABASE=openadminpanel
      - DB_USERNAME=root
      - DB_PASSWORD=amiko123
    depends_on:
      - db

  mysql:
    image: mysql:8.0
    container_name: laravel-db
    ports:
      - "3306:3306"
    environment:
      MYSQL_ROOT_PASSWORD: amiko123
      MYSQL_DATABASE: openadminpanel
      MYSQL_USER: root
      MYSQL_PASSWORD: amiko123
    volumes:
      - mysql:/var/lib/mysql

  phpmyadmin:
    image: phpmyadmin/phpmyadmin:latest
    container_name: phpmyadmin
    ports:
      - "8080:80"
    environment:
      PMA_HOST: mysql
      PMA_PORT: 3306
    depends_on:
      - mysql

  nexusrplogs:
    image: mysql:8.0
    container_name: nexusrplogs-db
    ports:
      - "3308:3306"
    environment:
      MYSQL_ROOT_PASSWORD: amiko123
      MYSQL_DATABASE: nexusrplogs
      MYSQL_USER: root
      MYSQL_PASSWORD: amiko123
    volumes:
      - nexusrplogs_data:/var/lib/mysql

  nexusrp:
    image: mysql:8.0
    container_name: nexusrp-db
    ports:
      - "3309:3306"
    environment:
      MYSQL_ROOT_PASSWORD: amiko123
      MYSQL_DATABASE: nexusrp
      MYSQL_USER: root
      MYSQL_PASSWORD: amiko123
    volumes:
      - nexusrp_data:/var/lib/mysql

volumes:
  mysql:
  nexusrplogs_data:
  nexusrp_data:
