Query in docker compose

I was practicing below question:
Create a docker-compose.yml file under the path /root/wordpress. Once done, run a docker-compose up.

Service Name: wordpress, Image: wordpress. Service Name:db, Image:postgres.

  • Syntax Check for the docker-compose.yml
  • Wordpress published on the correct HostPort 8085?
  • WordPress linked to db container
  • db container running with env variable POSTGRES_PASSWORD=mysecretpassword?

And my solution is

version: “2”
image: wordpress
- 8085:80

image: postgres
POSTGRES_PASSWORD: mysecretpassword?

And i m getting this error

$ docker-compose up
ERROR: yaml.scanner.ScannerError: while scanning for the next token
found character ‘\t’ that cannot start any token
in “./docker-compose.yml”, line 3, column 1

Have you tried to look up this error message?

Looks like your docker-compose file is not using the correct indentation.

Check this please: