-
Notifications
You must be signed in to change notification settings - Fork 0
environment variable substitution #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
.env.sample
Outdated
| @@ -0,0 +1,3 @@ | |||
| UID2_BASE_URL="https://operator-integ.uidapi.com" | |||
| SERVER_PUBLIC_KEY="UID2-X-I-MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEo+jcPlk8GWn3iG0R5Il2cbFQI9hR3TvHxaBUKHl5Vh+ugr+9uLMiXihka8To07ETFGghEifY96Hrpe5RnYko7Q==" | |||
| SUBSCRIPTION_ID="DMr7uHxqLU" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we update subscription id and server public key variable names to start with UID2 since there will be UID2 and EUID versions of these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| # Set default values if not provided | ||
| export UID2_BASE_URL=${UID2_BASE_URL:-"https://operator-integ.uidapi.com"} | ||
| export SERVER_PUBLIC_KEY=${SERVER_PUBLIC_KEY:-"UID2-X-I-MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEo+jcPlk8GWn3iG0R5Il2cbFQI9hR3TvHxaBUKHl5Vh+ugr+9uLMiXihka8To07ETFGghEifY96Hrpe5RnYko7Q=="} | ||
| export SUBSCRIPTION_ID=${SUBSCRIPTION_ID:-"DMr7uHxqLU"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can these variables be reused between here and the .env/.env.sample file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a change to this to have a single source for env variables. We don't want to assume an .env file exists so we need the defaults in here
| export $(cat /tmp/env | xargs) | ||
|
|
||
| # Set default values if not provided | ||
| export UID2_BASE_URL=${UID2_CSTG_BASE_URL:-"https://operator-integ.uidapi.com"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this just be BASE_URL then? and base url everywhere instead of UID2_BASE_URL. its a little weird to have base url start with UID2 but server public key and subscription id don't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
No description provided.