docker-compose Unsupported config option

  docker, question

Docker-compose.yml original document

version: '3'
 
 services:
 
 wordpress:
 image: wordpress
 ports:
 - "80"
 environment:
 WORDPRESS_DB_HOST: mysql
 WORDPRESS_DB_PASSWORD: root
 networks:
 - my-bridge
 
 mysql:
 image: mysql
 environment:
 MYSQL_ROOT_PASSWD: root
 MYSQL_DATABASE: wordpress
 volumes:
 - mysql-data:/var/bib/mysql
 networks:
 - my-bridge
 
 volumes:
 mysql-data:
 
 networks:
 my-bridge:
 drive: bridge

$ docker-compose up

ERROR: The Compose file './docker-compose.yml' is invalid because:
 Unsupported config option for services.networks: 'my-bridge'
 Unsupported config option for services.volumes: 'mysql-data'

$ docker-compose version

docker-compose version 1.23.2, build 1110ad01
 docker-py version: 3.6.0
 CPython version: 3.6.7
 OpenSSL version: OpenSSL 1.1.0f  25 May 2017

$ docker version

Client:
 Version:           18.09.3
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        774a1f4
 Built:             Thu Feb 28 06:53:11 2019
 OS/Arch:           linux/amd64
 Experimental:      false
 
 Server: Docker Engine - Community
 Engine:
 Version:          18.09.3
 API version:      1.39 (minimum version 1.12)
 Go version:       go1.10.8
 Git commit:       774a1f4
 Built:            Thu Feb 28 05:59:55 2019
 OS/Arch:          linux/amd64
 Experimental:     false

It’s strange. Why did you report the mistake? ? ? Is there a problem with my indenting?

Cry/(O)/~ ~ Mahathir
Final revision

version: '3'
 
 services:
 
 wordpress:
 image: wordpress
 ports:
 - 80
 environment:
 WORDPRESS_DB_HOST: mysql
 WORDPRESS_DB_PASSWORD: root
 networks:
 - my-bridge
 
 mysql:
 image: "mysql:5.7.25"
 environment:
 MYSQL_ROOT_PASSWORD: root
 MYSQL_DATABASE: wordpress
 volumes:
 - mysql-data:/var/lib/mysql
 networks:
 - my-bridge
 
 volumes:
 mysql-data:
 
 networks:
 my-bridge:
 driver: bridge

Thank you very much for myskies’ guidance.

services:
 
 wordpress:
 image: wordpress
 ports:
 - "80"
 environment:
 WORDPRESS_DB_HOST: mysql
 WORDPRESS_DB_PASSWORD: root
 networks:
 - my-bridge
 
 mysql:
 image: mysql
 environment:
 MYSQL_ROOT_PASSWD: root
 MYSQL_DATABASE: wordpress
 volumes:
 - mysql-data:/var/bib/mysql
 networks:
 - my-bridge
 
 # volumes: This should be placed under wordpress or mysql
 #    mysql-data:
 
 # Network and services are at the same level
 networks:
 my-bridge:
 drive: bridge