Docker and laravel's questions about redis

run the laravel framework in the docker environment, using the predis extension. In the link redis Times made an error:

Mar.05,2021

when it was finally found that the system environment variable of docker overrides the .env variable of laravel.
there are two

solutions.
  1. add the following code under the docker-compose.yml file
environment:
      REDIS_PORT: 6379

I've tried this method, but it didn't work. I don't know why. I'd like to ask for an explanation.

  1. modify the .env configuration file directly REDIS_HOST=dnmp_redis_1:6379 . This method is tested to be valid

finally put a reference link link description

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-1e4d6a4-434e2.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-1e4d6a4-434e2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?