The title of the topic is “I don’t know what I’m doing wrong”,
So the first is choosing a title. Please, choose a title which actually describes the issue. I changed the title. Then please, format your post properly with code blocks so we (and you as well) can see the indentation and not the altered code by the forum. The problem is the indentation which is really important in case of a yaml file. The space after yaml keys are also missing. You can see that becuse I fixed your post and the syntax higligthing shows those lines as red.
Then the database service is not even indented. So I have to say that everything is wrong.
I also moved the topic from the Docker Desktop category since the issue is not related to Docker Desktop.