Correct way to define redis server list as Docker ENV

What is the correct way to define redis server list with docker ENV variables? I tried many combinations but it seems that application service has problems with the array (error “missing ‘]’ in address”). e.g. inside docker compose file:

environment:
  'REDIS__SERVERS: ["host1", "host2"]'

Ah I fixed it with (it was to easy I think :wink: )

environment:
  REDIS__SERVERS: host1,host2