Here is how to specify dockerfile. Sorry I cannot do it in comments as formatting is not supported over there.
The dockerfile is searched into the defined build context, that is, you don’t specify any path, just the filename of your Dockerfile.
https://docs.docker.com/compose/compose-file/#context
app:
build:
context: app
dockerfile: Dockerfile