version: '3.7'

services:

  mysql:
    image: mysql
    container_name: practice_mysql
    command: --default-authentication-plugin=mysql_native_password
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: practice_db
      MYSQL_USER: practice
      MYSQL_PASSWORD: practice
    restart: always
    volumes:
      - mysql_data:/var/lib/mysql
    ports:
      - 3306:3306
    networks:
      - default

  adminer:
    image: adminer
    restart: always
    ports:
      - 8080:8080
    networks:
      - default

volumes:
  mysql_data:
    driver: local

networks:
  default:
    name: practice-network
    external: true