version: '2'

services:
#   mariadb:
#     image: docker.io/bitnami/mariadb:10.6
#     environment:
#       # ALLOW_EMPTY_PASSWORD is recommended only for development.
#       - ALLOW_EMPTY_PASSWORD=yes
#       - MARIADB_USER=my_user
#       - MARIADB_DATABASE=my_database
#       - MARIADB_PASSWORD=my_password

  baemon-sim:
    tty: true
    image: docker.io/bitnami/laravel:8
    environment:
      - DB_HOST=db
      - DB_USERNAME=babeng
      - DB_DATABASE=babeng
      - DB_PASSWORD=babeng
    depends_on:
      - db
    ports:
      - 3000:3000
    volumes:
      - ./:/app
    # privileged: true # Privileged mode could be required to run this container under Windows


  db:
    image: mysql:8
    command: --default-authentication-plugin=mysql_native_password
    volumes:
      - ./data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: babeng
      MYSQL_DATABASE: babeng
      MYSQL_USER: babeng
      MYSQL_PASSWORD: babeng
    cap_add:
      - SYS_NICE # CAP_SYS_NICE
  pma:
    depends_on:
      - db
    image: phpmyadmin/phpmyadmin
    ports:
      - "8081:80"
    environment:
      PMA_HOST: db
      PMA_USER: babeng
      PMA_PASSWORD: babeng
      MYSQL_ROOT_PASSWORD: babeng
