<#3447 Support specifying a custom dotenv file nam...
# meltano-repo-activity
g
#3447 Support specifying a custom dotenv file name/path Issue created by MeltyBot Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/3533 Originally created by @edgarrmondragon on 2022-05-25 225627 --- ### Problem to solve Users might want to use the same environment variables names for different stages. So, for example, instead of relying on
PROD_SF_DBNAME
and
DEV_SF_DBNAME
, they could use the single
SF_DBNAME
, read from different
prod.env
and
dev.env
files respectively. ### Target audience Users with more than one environment/stage: prod, dev, etc. ### Further details Docker and Compose have a similar feature. ### Proposal • The path of the custom env file is always relative to the project root. UPDATE: Unless the value represents an absolute path, in which case the file can live outside the project directory. • A project level
env_file
setting that defaults to
.env
. The path is always relative to the project root. • It can be set: globally in
meltano.yml
project_id: b7854e29-07a4-2200-0ea7-1bda759ccd3d env_file: .env or in the CLI (this is similar to Docker's
--env-file
) meltano --env-file prod.env run ... or (optionally?) at the
environments.*
level environments: - name: prod env_file: prod.env - name: dev env_file: dev.env ### What does success look like, and how can we measure that? Users can reuse environment variable names and switch environments more easily. ### Regression test • Write adequate test cases and submit test results • Test results should be reviewed by a person from the team ### Links / references meltano/meltano