title: How to get proper docker-compose Multiline environment variables formatting?
body: <p>I made a <em>docker-compose.yaml</em> for my Wordpress stack using official Wordpress image and I want to add some custom constants in wp-config.php file automatically.</p>
  
  <p>By following official image instructions I end up with this:</p>
  
  <pre><code>### Web Application
    wordpress:
      container_name: 'wordpress'
      image: 'wordpress:php7.2-fpm-alpine'
      user: 1001:1001
      environment:
        - WORDPRESS_DB_HOST=mysql
        - WORDPRESS_DB_USER=something
        - WORDPRESS_DB_NAME=something
        - WORDPRESS_DB_PASSWORD=xxxxxxxxxxxxxxx
        - WORDPRESS_DEBUG=1
        - WORDPRESS_CONFIG_EXTRA=
            define( 'WP_REDIS_CLIENT', 'predis' );
            define( 'WP_REDIS_SCHEME', 'tcp' );
            define( 'WP_REDIS_HOST', 'redis' );
            define( 'WP_REDIS_PORT', '6379' );
            define( 'WP_REDIS_PASSWORD', 'xxxxxxxxxxxxxxx' );
            define( 'WP_REDIS_DATABASE', '0' );
            define( 'WP_REDIS_MAXTTL', '21600' );
            define( 'WP_CACHE_KEY_SALT', 'xx_ ');
            define( 'WP_REDIS_SELECTIVE_FLUSH', 'xx_ ');
            define( 'WP_AUTO_UPDATE_CORE', false );
      volumes:
        - ./wordpress:/var/www/html
        - ./logs/php:/var/logs/php
        - ./config/php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
      networks:
        - frontend
        - backend
      restart: always
      depends_on:
        - mysql
  </code></pre>
  
  <p>Everything works but my OCD can't rest until I figure out why generated wp-config.php looks like this: <em>WORDPRESS_CONFIG_EXTRA</em> constants joined in one line:</p>
  
  <pre><code>// WORDPRESS_CONFIG_EXTRA
  define('WP_REDIS_CLIENT', 'predis'); define('WP_REDIS_SCHEME', 'tcp'); define('WP_REDIS_HOST', 'redis'); define('WP_REDIS_PORT', '6379'); define('WP_REDIS_PASSWORD', 'xxxxxxxxxxxxxxx'); define('WP_REDIS_DATABASE', '0'); define('WP_REDIS_MAXTTL', '21600'); define('WP_CACHE_KEY_SALT', 'xx_'); define('WP_REDIS_SELECTIVE_FLUSH', 'xx_');
  </code></pre>
  
  <p>..instead of like this, formatted with each constant being on new line which is much more readable:</p>
  
  <pre><code>// WORDPRESS_CONFIG_EXTRA
  define('WP_REDIS_CLIENT', 'predis');
  define('WP_REDIS_SCHEME', 'tcp');
  define('WP_REDIS_HOST', 'redis');
  define('WP_REDIS_PORT', '6379');
  define('WP_REDIS_PASSWORD', 'xxxxxxxxxxxxxxx');
  define('WP_REDIS_DATABASE', '0');
  define('WP_REDIS_MAXTTL', '21600');
  define('WP_CACHE_KEY_SALT', 'xx_');
  define('WP_REDIS_SELECTIVE_FLUSH', 'xx_');
  </code></pre>
  
  <p>Can anyone guide me on how multiline environment variables are handled in docker-compose file, specifically for <strong>WORDPRESS_CONFIG_EXTRA</strong> variable?</p>
  
  <p>I tried <code>WORDPRESS_CONFIG_EXTRA: |</code> and <code>WORDPRESS_CONFIG_EXTRA: |-</code> but none worked the way I think it should.</p>