How do I configure the network as a container (joined container) mode in the docker-compose.yaml file?

I built the lnmp environment using docker-compose.
Communication between php and redis containers using container names is fine, but I want to share a network card through both containers, and php connects to redis through 127.0.0.1.
how to write a requirement yaml file like this?

Mar.23,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d77b-34761.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d77b-34761.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?