title: Docker Compose throws invalid type error
body: <p>I'm having an issue running docker compose. Specifically i'm getting this error: </p>
  
  <pre><code>ERROR: The Compose file './docker-compose.yml' is invalid because:
  services.login-service.environment contains {"REDIS_HOST": "redis-server"}, which is an invalid type, it should be a string
  </code></pre>
  
  <p>And here's my yml file:</p>
  
  <pre><code>version: '3'
  
  services:
    redis:
      image: redis
      ports:
        - 6379:6379
      networks:
        - my-network
  
    login-service:
      tty: true
      build: .
      volumes:
        - ./:/usr/src/app
      ports:
        - 3001:3001
      depends_on:
        - redis
      networks:
        - my-network
      environment:
        - REDIS_HOST: redis
      command: bash -c "./wait-for-it.sh redis:6379 -- npm install &amp;&amp; npm run dev"
  
  networks:
    my-network:
  </code></pre>
  
  <p>Clearly the issue is where I set my environment variable even though i've seen multiple tutorials that use the same syntax. The purpose of it is to set <code>REDIS_HOST</code> to whatever ip address docker assigns to Redis when building the image. Any insights what I may need to change to get this working?</p>