I study Docker. There are 2 containers (application and database). How to properly configure the network in Dokker so that users from the local network can connect to the application server?
I want to configure the network in the docker-composite configuration file. I hope this is possible?
version: "3.5" services: db: image: mongo:3.0 command: mongod --smallfiles --oplogSize 128 networks: - rocket_chat_network rocketchat: image: rocketchat/rocket.chat:latest environment: - PORT=3000 - ROOT_URL=http://docker:3000 - MONGO_URL=mongodb://db:27017/rocketchat links: - db:db ports: - 3000:3000 networks: - rocket_chat_network networks: rocket_chat_network: name: rchat_neork driver: bridge
I get an error with the current file:
PS C:\rocket\chat> docker-compose up -d
ERROR: The Compose file ‘.\docker-compose.yml’ is invalid because:
Unsupported config option for services.networks: ‘rocket_chat_network’
Guided by example of docker docs.
I will be glad to any help (be it an algorithm of actions, links to training material, correction of my configuration file). Thanks in advance!