Docker-compose with mysql but still uses sqlite

I am new to Nextcloud and this is my first installation. On a Ubuntu 22.04 LTS server I have setup a docker-compose.yml file as described in the documentation. My docker-compose.yml is as below, and after running sudo docker-compose up I am able to access localhost:8080 and after log in it still says that I am using sqllite and not mysql as defined in my docker-compose file

version: '2'

volumes:
  nextcloud:
  db:

services:
  db:
    image: mariadb:10.6
    restart: always
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=mypassword
      - MYSQL_PASSWORD=mypassword
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  app:
    image: nextcloud
    restart: always
    ports:
      - 8080:80
    links:
      - db
    volumes:
      - nextcloud:/var/www/html
    environment:
      - MYSQL_PASSWORD=mypassword
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db

Hi, I recommend AIO since you are missing a number of performance improvements in the compose file. Cheers!
I think you’ll like it.

https://hub.docker.com/r/nextcloud/all-in-one