yao_zhang
08/31/2023, 5:19 PMWill Da Silva (Arch)
08/31/2023, 5:39 PM.env
file. The environment variables from a .env
file have the second lowest precedenceWill Da Silva (Arch)
08/31/2023, 5:41 PM.env
file that make use of environment variables from the environment of the process, e.g. the following line could go within a .env
file:
MY_ENV_VAR="prefix-${MY_ENV_VAR}-suffix"
yao_zhang
08/31/2023, 5:49 PM.env
file but during production we want to supply during build time by fetching from our secrets backend so that it'll be available in the container to use.
ARG MELTANO_IMAGE=meltano/meltano:v2.20.0-python3.9
# setting default env values
ARG TAP_PAGERDUTY_TOKEN
ARG TAP_ORBIT_API_KEY
ARG TAP_STATUSPAGE_API_KEY
ARG TAP_AIRTABLE_TOKEN
ARG TAP_CIRCLECI_TOKEN
FROM $MELTANO_IMAGE
# setting env vars
ENV TAP_PAGERDUTY_TOKEN=${TAP_PAGERDUTY_TOKEN}
ENV TAP_ORBIT_API_KEY=${TAP_ORBIT_API_KEY}
ENV TAP_STATUSPAGE_API_KEY=${TAP_STATUSPAGE_API_KEY}
ENV TAP_AIRTABLE_TOKEN=${TAP_AIRTABLE_TOKEN}
ENV TAP_CIRCLECI_TOKEN=${TAP_CIRCLECI_TOKEN}
locally we have an .env
file populated with these keys but when this builds and i run a printenv
in the container it seems that the values do not get overwritten by the values in .env
for example:
TAP_AIRTABLE_TOKEN=
PYTHON_SETUPTOOLS_VERSION=58.1.0
HOME=/root
LANG=C.UTF-8
TAP_PAGERDUTY_TOKEN=
maybe i'm approaching this wrong but any help would be greatly appreciatedyao_zhang
08/31/2023, 5:54 PM