Adding components to a Compose definition just means adding a new service block - and you can add another network block too.
A service definition can have multiple network entries, but the network name used in the service needs to match a network defined in the Compose file.
And you can look at the details of any Docker object by inspecting it.
Need more? Here's the solution.