version: '3.2'
services:
  mysql:
    image: 'mysql:${MYSQL_VERSION:-latest}'
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    ports:
      - '${PORT_MYSQL}:3306'
    volumes:
      - 'data:/var/lib/mysql'
    environment:
      MYSQL_ROOT_PASSWORD: '${DB_ROOT_PASSWORD}'
    container_name: '${PROJECT_NAME}_db'
volumes:
  data: null
networks:
  default:
    external:
      name: mysql-80
