docker-compose does not create directory

I have the following docker-compose version: "3.9" services: foo: image: an_image volumes: - source: ./logs target: /tmp/data type: bind I am