Unsupported config option for services.db: 'wordpress'

version: '3'

services: 

 db:
    image: mysql:5.7
    volumes: 
        - db_data:/var/lib/mysql
    restart: always
    environment: 
        MYSQL_ROOT_PASSWORD: password
        MYSQL_DATABASE: wordpress
        MYSQL_USER: wordpress
        MYSQL_PASSWORD: wordpress
    networks: 
        - wpsite
    # WORDPRESS
    wordpress:
        depends_on:
            - db
        image: wordpress:latest
        ports: 
            - '8000:80'
        restart: always
        volumes: ['./:/var/www/html']
        environment: 
            WORDPRESS_DB_HOST: db:3306
            WORDPRESS_DB_USER: wordpress
            WORDPRESS_DB_PASSWORD: wordpress
        networks: 
            - wpsite
networks: 
   wpsite:
volumes: 
   db_data:

i was following this guy [https://www.youtube.com/watch?v=pYhLEV-sRpY] (https://www.youtube.com/watch?v=pYhLEV-sRpY) and for him it works but mine does not its says Unsupported config option for services.db: ‘wordpress’, can someone help me?

You yaml identition is the problem: the node ‘wordpress:’ needs to be on the same level als ‘db:’.

Hint: In yaml files, indention has semantics: use two spaces for a level of indention. Using the tab charachter will break your file.