-
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
Changes from all commits
2b06396
33a8246
b262450
e7878dc
881700f
2e24379
a1b3f0b
50a94be
d267607
d11622e
aaf6922
2c154e8
0edacc9
961555e
c2c1048
15bf72e
c53a3b9
48c65e2
952e48c
8e7b765
4625ccc
ac67fb2
18a92af
787b6d7
b367cfb
81f1de5
1f27bfb
aaeb383
8d44b5a
d091bf1
e2f133c
8a95e9a
376c6ba
af5a8a1
798710a
d671092
0e3ebee
b6782c6
b573195
cec7099
c09ea4b
72547e5
826f8bf
7486088
141e172
a6646d2
3b0e7c8
4817eaf
2c88219
299c6e3
b4707b6
710dc82
7f38062
440db5b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
DATABASE_URL=postgres://postgres:pw@postgres:5432/ecr_viewer_db | ||
APP_ENV=test | ||
NBS_AUTH=false | ||
AZURE_CONTAINER_NAME=ecr-viewer-files |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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? |
||
|
||
if [ "$IS_NON_INTEGRATED" = true ]; then | ||
echo "COLLECTION=AWS_SQLSERVER_NON_INTEGRATED" >> .env.local | ||
else | ||
echo "COLLECTION=AWS_INTEGRATED" >> .env.local | ||
fi | ||
|
||
# Run FHIR conversion on seed data | ||
if [ "$CONVERT_SEED_DATA" = true ]; then | ||
echo "Running seed data FHIR conversion..." | ||
docker compose -f ./docker-compose-seed.yml --profile "*" down -v | ||
npm run clear-local | ||
npm run convert-seed-data:build | ||
else | ||
echo "Skipping seed data FHIR conversion..." | ||
fi | ||
|
||
# Run ecr viewer | ||
npx @dotenvx/dotenvx run -f .env.local -- sh -c 'docker compose -f ./docker-compose.yml --profile ${SOURCE} --profile ${METADATA_DATABASE_TYPE} --profile ecr-viewer up -d' | ||
npm run local-docker | ||
|
||
# Wait for eCR Viewer to be available | ||
URL="http://localhost:3000/ecr-viewer" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
NBS_AUTH=true | ||
NEXT_PUBLIC_NON_INTEGRATED_VIEWER=false | ||
SOURCE=s3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
NBS_AUTH=false | ||
NEXT_PUBLIC_NON_INTEGRATED_VIEWER=true | ||
SOURCE=s3 | ||
METADATA_DATABASE_TYPE=postgres | ||
METADATA_DATABASE_SCHEMA=core |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
NBS_AUTH=false | ||
NEXT_PUBLIC_NON_INTEGRATED_VIEWER=true | ||
SOURCE=s3 | ||
METADATA_DATABASE_TYPE=sqlserver | ||
METADATA_DATABASE_SCHEMA=extended |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
NBS_AUTH=true | ||
NEXT_PUBLIC_NON_INTEGRATED_VIEWER=false | ||
SOURCE=azure |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
NBS_AUTH=false | ||
NEXT_PUBLIC_NON_INTEGRATED_VIEWER=true | ||
SOURCE=azure | ||
METADATA_DATABASE_TYPE=postgres | ||
METADATA_DATABASE_SCHEMA=core |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
NBS_AUTH=false | ||
NEXT_PUBLIC_NON_INTEGRATED_VIEWER=true | ||
SOURCE=azure | ||
METADATA_DATABASE_TYPE=sqlserver | ||
METADATA_DATABASE_SCHEMA=extended |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,16 +6,18 @@ | |
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"local-dev": "npx @dotenvx/dotenvx run -f .env.local -- sh -c 'docker compose -f ./docker-compose.yml --profile ${SOURCE} --profile ${METADATA_DATABASE_TYPE} up -d && npm run dev'", | ||
"local-dev": "npx @dotenvx/dotenvx run -f .env.local -- npm run local-dev:sub", | ||
"local-dev:sub": "npx @dotenvx/dotenvx run -f ./env/.env.${COLLECTION} -- sh -c 'docker compose -f ./docker-compose.yml --profile ${COLLECTION} up -d && npm run dev'", | ||
"local-docker": "npx @dotenvx/dotenvx run -f .env.local -- sh -c 'docker compose -f ./docker-compose.yml --profile ${COLLECTION} --profile ecr-viewer up -d'", | ||
"setup-local-env": "./setup-env.sh", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint", | ||
"test": "TZ=America/New_York jest", | ||
"test:watch": "TZ=America/New_York jest --watch", | ||
"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 commentThe 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 |
||
"convert-seed-data": "npx @dotenvx/dotenvx run -f .env.local -- sh -c 'docker compose -f ./seed-scripts/docker-compose-seed.yml --profile ${COLLECTION} --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 ${COLLECTION} --profile ecr-viewer up --abort-on-container-exit --build'", | ||
"update-cypress-data": "docker compose -f ./seed-scripts/docker-compose-create-sql.yml up --build --abort-on-container-exit", | ||
"cypress:open": "cypress open", | ||
"cypress:run": "cypress run", | ||
|
@@ -65,7 +67,7 @@ | |
"sanitize-html": "^2.13.1" | ||
}, | ||
"devDependencies": { | ||
"@dotenvx/dotenvx": "^1.22.0", | ||
"@dotenvx/dotenvx": "^1.25.1", | ||
"@next/eslint-plugin-next": "^14.2.5", | ||
"@smithy/util-stream": "^2.1.2", | ||
"@testing-library/jest-dom": "^6.1.5", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM mcr.microsoft.com/azure-storage/azurite:latest | ||
|
||
RUN apk add py3-pip | ||
RUN apk add gcc musl-dev python3-dev libffi-dev openssl-dev cargo make | ||
RUN pip install --upgrade pip | ||
RUN pip install azure-cli | ||
|
||
WORKDIR /data | ||
CMD ["/bin/sh"] |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
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