services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "8002:80"
    environment:
      APP_NAME: IVENHUB
      APP_ENV: production
      APP_DEBUG: "false"
      APP_URL: http://localhost:8002
      APP_KEY: base64:fH7R/Wn+P9Q6u+k/8z5J/wX/mN8z5J/wX/mN8z5J/wX=
      LOG_CHANNEL: stderr
      LOG_INGEST_TOKEN: dev-log-token
      DB_CONNECTION: mysql
      DB_HOST: db
      DB_PORT: "3306"
      DB_DATABASE: app
      DB_USERNAME: app
      DB_PASSWORD: app
      CACHE_DRIVER: file
      QUEUE_CONNECTION: database
      SESSION_DRIVER: file
      SESSION_SECURE_COOKIE: "false"
    volumes:
      - ./storage:/var/www/html/storage
      - ./bootstrap/cache:/var/www/html/bootstrap/cache
    depends_on:
      - db

  db:
    image: mysql:8.0
    command: --default-authentication-plugin=mysql_native_password
    environment:
      MYSQL_DATABASE: app
      MYSQL_USER: app
      MYSQL_PASSWORD: app
      MYSQL_ROOT_PASSWORD: root
    ports:
      - "3307:3306"
    volumes:
      - db_data:/var/lib/mysql

  phpmyadmin:
    image: phpmyadmin/phpmyadmin:latest
    depends_on:
      - db
    ports:
      - "8081:80"
    environment:
      PMA_HOST: db
      PMA_PORT: 3306
      PMA_ARBITRARY: 1

volumes:
  db_data:
