I am writing a docker-compose.yml and have several containers that require certain environment variables set to the same value (ie CONTACT_EMAIL).
Currently my docker-compose.yml looks something like this:
version: '2.0'
    services:
        service1:
            ...
            environment:
                CONTACT_EMAIL: webmaster@example.com
            ...
        service2:
            ...
            environment:
                CONTACT_EMAIL: webmaster@example.com
            ...
        service3:
            ...
            environment:
                CONTACT_EMAIL: webmaster@example.com
            ...
Is there a way to define a variable/ constant WEBMASTER within the yaml file and assign the value to the CONTACT_EMAIL environment variables?
Or is it possible to define an environment for all services (within the yaml file)?
 
     
    