-
Notifications
You must be signed in to change notification settings - Fork 15
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
Setup environment variable collection #2963
Conversation
docker compose --env-file .env.local --profile "*" up to test with different configs
APP_ENV=test | ||
NEXT_PUBLIC_NON_INTEGRATED_VIEWER=true | ||
SOURCE=postgres | ||
COLLECTION=AWS_SQLSERVER_NON_INTEGRATED |
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.
spitballing:
ENV_FILE
ENV_COLLECTION
APP_CONFIG
CONFIG_NAME
CONFIG_COLLECTION
"clear-local": "docker compose -f ./docker-compose.yml --profile \"*\" down -v", | ||
"convert-seed-data": "npx @dotenvx/dotenvx run -f .env.local -- sh -c 'docker compose -f ./seed-scripts/docker-compose-seed.yml --profile ${SOURCE} --profile ${METADATA_DATABASE_TYPE} --profile ecr-viewer up --abort-on-container-exit'", | ||
"convert-seed-data:build": "npx @dotenvx/dotenvx run -f .env.local -- sh -c 'docker compose -f ./seed-scripts/docker-compose-seed.yml --profile ${SOURCE} --profile ${METADATA_DATABASE_TYPE} --profile ecr-viewer up --abort-on-container-exit --build'", | ||
"clear-local": "docker compose -f ./docker-compose.yml --profile \"*\" down -v && docker compose -f ./seed-scripts/docker-compose-seed.yml --profile \"*\" down -v", |
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 think we'd only need the seed-script one since it includes the outer one
@@ -89,19 +89,25 @@ npm i | |||
|
|||
# Write env vars to .env.local | |||
npm run setup-local-env | |||
echo "NEXT_PUBLIC_NON_INTEGRATED_VIEWER=$IS_NON_INTEGRATED" >> .env.local | |||
echo "NBS_AUTH=false" >> .env.local |
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.
does this always hold even when the collection has it set the opposite?
PULL REQUEST
Summary
COLLECTION
env variable to help support the different profilesCOLLECTION
COLLECTION
, a different profile will be used to start the serverCOLLECTION
and it's variables only need to be set in one placeCleanup 🧹
APP_ENV
toNBS_AUTH
Related Issue
Fixes #2873
Acceptance Criteria
Additional Information
Anything else the review team should know?
Checklist