Example of official docker-compose.yml file:https://docs.docker.com/compo …
In the official example, networks looks like this:
networks: frontend: backend:
networksThe value of
backendWhat does it mean? Other examples cited by Baidu are written in a variety of other ways.
Frontend, backend are custom network that need to be created manually (for example:
docker network create frontend)
This way, you can declare and use it in the compose file