matomo-docker 500 error while mounting config volume

When I uncomment the ./config and ./logs volumes it’s giving me http 500 error, I was trying to change the config.php.ini file, Any idea what’s wrong? Also tried creating the config and log folders before running `docker-compose up’ - still its not working.

my docker-compose file

version: '3'

services:
  app:
    image: matomo:fpm-alpine
    restart: always
    volumes:
      #- ./config:/var/www/html/config
      #- ./logs:/var/www/html/logs
      - matomo:/var/www/html

    environment:
      - MATOMO_DATABASE_HOST= "--"
    env_file:
      - ./db.env
    #user: ubuntu

  web:
    image: nginx:alpine
    restart: always
    volumes:
      - matomo:/var/www/html:ro
      # see https://github.com/matomo-org/matomo-nginx
      - ./matomo.conf:/etc/nginx/conf.d/default.conf:ro
    ports:
      - 8080:80
    #user: ubuntu

volumes:
  matomo: