I was wondering, let's say I had the following .env file:
STAGING_ALLOWED_DOMAINS=example.com
STAGING_SITES=example.com=web:8000
Is there a way to condense the following services to utilise the same environment settings, or do they always need to be explicitly listed for each service?
services:
web:
environment:
ALLOWED_DOMAINS: "${STAGING_ALLOWED_DOMAINS}"
SITES: "${STAGING_SITES}"
nginx:
environment:
ALLOWED_DOMAINS: "${STAGING_ALLOWED_DOMAINS}"
SITES: "${STAGING_SITES}"
celery:
environment:
ALLOWED_DOMAINS: "${STAGING_ALLOWED_DOMAINS}"
SITES: "${STAGING_SITES}"
celery-beat:
environment:
ALLOWED_DOMAINS: "${STAGING_ALLOWED_DOMAINS}"
SITES: "${STAGING_SITES}"
Is there a cleaner way to share environment configurations?