services: db: image: mysql:9 environment: MYSQL_ROOT_PASSWORD: test MYSQL_USER: test MYSQL_PASSWORD: test MYSQL_DATABASE: db volumes: - mysql:/var/lib/mysql ports: - 3306:3306 volumes: mysql: {}