Skip to content
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

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2b06396
ignore .next in jest
BobanL Nov 25, 2024
33a8246
mute console error from jest results
BobanL Nov 25, 2024
b262450
rename app_env to nbs_auth
BobanL Nov 26, 2024
e7878dc
Remove app env check around s3 client
BobanL Nov 26, 2024
881700f
add collection variables for env groups
BobanL Nov 26, 2024
2e24379
fix typos in .env files
BobanL Nov 27, 2024
a1b3f0b
create single azure-storage image that contains both azurite and azur…
BobanL Nov 27, 2024
50a94be
add additional chaining to run specific collections
BobanL Nov 27, 2024
d267607
fix local-dev command to use collection
BobanL Nov 27, 2024
d11622e
update create-seed-data to use different configs depending on metadata
BobanL Nov 27, 2024
aaf6922
rename schemas
BobanL Nov 27, 2024
2c154e8
update .env.sample to include collection
BobanL Nov 27, 2024
0edacc9
remove azure-storage-init from orchestration
BobanL Nov 27, 2024
961555e
update orchestration docker compose to add collection
BobanL Nov 27, 2024
c2c1048
add metadata db schema in the env variable
BobanL Nov 29, 2024
15bf72e
remove undefined values
BobanL Dec 2, 2024
c53a3b9
remove nbs_auth value
BobanL Dec 2, 2024
48c65e2
Remove redundant variables
BobanL Dec 2, 2024
952e48c
change to aws non integrated and add timeout
BobanL Dec 2, 2024
8e7b765
Merge branch 'main' into boban/2873-env-variable-collections
BobanL Dec 3, 2024
4625ccc
add docker ignore
BobanL Dec 3, 2024
ac67fb2
Merge branch 'main' into boban/2873-env-variable-collections
BobanL Dec 4, 2024
18a92af
add more to docker ignore
BobanL Dec 4, 2024
787b6d7
Comment all from .env
BobanL Dec 4, 2024
b367cfb
fix tests that were relying on .env file
BobanL Dec 4, 2024
81f1de5
make metadata variables optional
BobanL Dec 4, 2024
1f27bfb
pull out saveFhirMetadata into it's own function
BobanL Dec 4, 2024
aaeb383
delete .env
BobanL Dec 4, 2024
8d44b5a
Use PersistenceResponse instead of Nextjs response
BobanL Dec 4, 2024
d091bf1
console log error messages
BobanL Dec 4, 2024
e2f133c
Do not close pool when done with mssql
BobanL Dec 4, 2024
8a95e9a
increase sqlserver timeout to 30 s
BobanL Dec 4, 2024
376c6ba
don't return anything from save ecr data query
BobanL Dec 5, 2024
af5a8a1
be more specific with env variable names
BobanL Dec 5, 2024
798710a
remove return for ecr data
BobanL Dec 5, 2024
d671092
update .env.sample variables
BobanL Dec 5, 2024
0e3ebee
fix first batch of seed script conflicts
BobanL Dec 6, 2024
b6782c6
use rewrite instead of redirect to keep url
BobanL Dec 6, 2024
b573195
set pool min to 1
BobanL Dec 8, 2024
cec7099
fix middleware test after changes to middleware rewrite to error page
BobanL Dec 9, 2024
c09ea4b
Merge branch 'main' into boban/2873-env-variable-collections
BobanL Dec 11, 2024
72547e5
remove NEXT_PUBLIC_BASEPATH from docker compose
BobanL Dec 11, 2024
826f8bf
remove unused interface and error logs
BobanL Dec 11, 2024
7486088
remove console log from test
BobanL Dec 11, 2024
141e172
remove unused environment values in ecr-viewer docker-compose
BobanL Dec 11, 2024
a6646d2
reorder convert-seed-data
BobanL Dec 11, 2024
3b0e7c8
change orchestration's ecr-viewer collection
BobanL Dec 11, 2024
4817eaf
simplify build step by setting collection as profile
BobanL Dec 11, 2024
2c88219
Update create-seed-data to use COLLECTION env variable
BobanL Dec 11, 2024
299c6e3
add a local-docker command too!
BobanL Dec 11, 2024
b4707b6
lighthouse start app command
BobanL Dec 11, 2024
710dc82
Merge branch 'main' into boban/2873-env-variable-collections
BobanL Dec 11, 2024
7f38062
make changes to design review script
BobanL Dec 12, 2024
440db5b
add a comment for nbs auth in .env.sample
BobanL Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/container-ecr-viewer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
node-version: ${{env.NODE_VERSION}}

- name: Start app
run: docker compose --env-file .env.test --profile postgres --profile ecr-viewer up -d
run: COLLECTION=AWS_SQLSERVER_NON_INTEGRATED docker compose --profile AWS_SQLSERVER_NON_INTEGRATED --profile ecr-viewer up -d
working-directory: ./containers/${{env.CONTAINER}}

- name: Wait for Application to be ready
Expand Down Expand Up @@ -147,6 +147,7 @@ jobs:

convert-data:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
9 changes: 3 additions & 6 deletions containers/ecr-viewer/.env.sample
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
APP_ENV=test
NEXT_PUBLIC_NON_INTEGRATED_VIEWER=true
SOURCE=postgres
COLLECTION=AWS_SQLSERVER_NON_INTEGRATED
# NBS_AUTH=false
Copy link
Collaborator

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


# Azure Connection
AZURE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://localhost:10000/devstoreaccount1;"
Expand All @@ -13,10 +12,8 @@ ECR_BUCKET_NAME=ecr-viewer-files
AWS_ACCESS_KEY_ID=123
AWS_SECRET_ACCESS_KEY=xyz

# Metadata
# Postgres
DATABASE_URL=postgres://postgres:pw@localhost:5432/ecr_viewer_db
METADATA_DATABASE_TYPE=postgres
METADATA_DATABASE_SCHEMA=core

# SQL Server
SQL_SERVER_USER=sa
Expand Down
2 changes: 1 addition & 1 deletion containers/ecr-viewer/.env.test
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
7 changes: 6 additions & 1 deletion containers/ecr-viewer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ RUN npm run build
FROM base AS runner
WORKDIR /app

# Install dotenvx
RUN apk add --no-cache curl
RUN curl -sfS https://dotenvx.sh | sh

# Uncomment the following line in case you want to disable telemetry during runtime.
ENV NEXT_TELEMETRY_DISABLED 1

Expand All @@ -43,6 +47,7 @@ RUN chown nextjs:nodejs .next
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
COPY --from=builder --chown=nextjs:nodejs /app/env ./env

USER nextjs

Expand All @@ -64,4 +69,4 @@ ENV OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://otel-collector:4318/v1/traces

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD node server.js
CMD ["sh", "-c", "dotenvx run --env-file=./env/.env.$COLLECTION -- node server.js"]
6 changes: 4 additions & 2 deletions containers/ecr-viewer/api-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ Display an eCR

**URL** : `/view-data?id=:id&snomed-code=:snomed&auth=:auth`

**URL Parameters** :
**URL Parameters** :

- `id=[string]` where `id` is the ID of the eCR.
- `snomed-code=[string]` where `snomed-code` is the condition the user is viewing the eCR for. OPTIONAL.
- `auth=[string]` where `auth` is the authentication token for the user. Only required if app_env is production.
- `auth=[string]` where `auth` is the authentication token for the user. Only required if NBS_AUTH is true.

**Method** : `GET`

Expand All @@ -16,6 +17,7 @@ Display an eCR
**Permissions required** : None

## Example Architecture

![NBS -> ECR Viewer sequence diagram](assets/nbs-ecr-viewer-arch.png)

## Success Response
Expand Down
2 changes: 1 addition & 1 deletion containers/ecr-viewer/cypress/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ services:
- "3000:3000"
environment:
- DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@db:5432/ecr_viewer_db}
- APP_ENV=${APP_ENV:-prod}
- NBS_AUTH=${NBS_AUTH:-true}
12 changes: 9 additions & 3 deletions containers/ecr-viewer/design-review/design-review.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

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?


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"
Expand Down
61 changes: 31 additions & 30 deletions containers/ecr-viewer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ services:
ports:
- "3000:3000"
environment:
- APP_ENV=${APP_ENV:-test}
- METADATA_DATABASE_TYPE=${METADATA_DATABASE_TYPE:-postgres}
- SOURCE=${SOURCE:-postgres}
- COLLECTION=${COLLECTION:-AWS_SQLSERVER_NON_INTEGRATED}
# POSTGRES
- DATABASE_URL=postgres://postgres:pw@postgres:5432/ecr_viewer_db
# AWS
- AWS_CUSTOM_ENDPOINT=http://aws-storage:4566
- AWS_REGION=${AWS_REGION:-us-east-1}
- ECR_BUCKET_NAME=${ECR_BUCKET_NAME:-ecr-viewer-files}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-123}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-xyz}
# Azure
- AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azure-storage:10000/devstoreaccount1;
- AZURE_CONTAINER_NAME=${AZURE_CONTAINER_NAME:-ecr-viewer-files}
- NEXT_PUBLIC_NON_INTEGRATED_VIEWER=${NEXT_PUBLIC_NON_INTEGRATED_VIEWER:-true}
- METADATA_DATABASE_SCHEMA=${METADATA_DATABASE_SCHEMA:-core}
- SQL_SERVER_USER=${SQL_SERVER_USER}
- SQL_SERVER_PASSWORD=${SQL_SERVER_PASSWORD}
# SQL Server
- SQL_SERVER_USER=${SQL_SERVER_USER:-sa}
- SQL_SERVER_PASSWORD=${SQL_SERVER_PASSWORD:-Password1!}
- SQL_SERVER_HOST=${SQL_SERVER_HOST:-sqlserver}
profiles:
- ecr-viewer
Expand All @@ -47,13 +47,14 @@ services:
timeout: 5s
retries: 20
profiles:
- postgres
- AWS_PG_NON_INTEGRATED
- AZURE_PG_NON_INTEGRATED

sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=${SQL_SERVER_PASSWORD}
- MSSQL_SA_PASSWORD=${SQL_SERVER_PASSWORD:-Password1!}
ports:
- "1433:1433"
volumes:
Expand All @@ -70,7 +71,8 @@ services:
timeout: 10s
retries: 5
profiles:
- sqlserver
- AWS_SQLSERVER_NON_INTEGRATED
- AZURE_SQLSERVER_NON_INTEGRATED

aws-storage:
image: gresau/localstack-persist:3
Expand All @@ -80,39 +82,38 @@ services:
- aws-data:/persisted-data
- ./seed-scripts/aws:/etc/localstack/init/ready.d
profiles:
- s3
- AWS_INTEGRATED
- AWS_PG_NON_INTEGRATED
- AWS_SQLSERVER_NON_INTEGRATED

azure-storage:
austin-hall-skylight marked this conversation as resolved.
Show resolved Hide resolved
image: mcr.microsoft.com/azure-storage/azurite
build:
context: ./seed-scripts
dockerfile: azurite.Dockerfile
hostname: azurite
restart: always
command: "azurite --blobHost 0.0.0.0 --blobPort 10000 -l data --debug /data/debug.log"
command:
- /bin/sh
- -c
- |
azurite --blobHost 0.0.0.0 --blobPort 10000 -l data --debug /data/debug.log &
sleep 5
az storage container create --name ecr-viewer-files
tail -f /dev/null
volumes:
- azure-data:/opt/azurite/data
environment:
AZURE_STORAGE_CONNECTION_STRING: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://localhost:10000/devstoreaccount1;
healthcheck:
test: nc 127.0.0.1 10000 -z
interval: 1s
retries: 30
ports:
- "10000:10000"
profiles:
- azure

azure-storage-init:
image: mcr.microsoft.com/azure-cli:latest
command:
- /bin/sh
- -c
- |
az storage container create --name ecr-viewer-files
depends_on:
azure-storage:
condition: service_healthy
environment:
# https://github.com/Azure/Azurite/blob/main/README.md#usage-with-azure-storage-sdks-or-tools
AZURE_STORAGE_CONNECTION_STRING: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azure-storage:10000/devstoreaccount1;
profiles:
- azure
- AZURE_INTEGRATED
- AZURE_PG_NON_INTEGRATED
- AZURE_SQLSERVER_NON_INTEGRATED

volumes:
db:
Expand Down
3 changes: 3 additions & 0 deletions containers/ecr-viewer/env/.env.AWS_INTEGRATED
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
5 changes: 5 additions & 0 deletions containers/ecr-viewer/env/.env.AWS_PG_NON_INTEGRATED
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
5 changes: 5 additions & 0 deletions containers/ecr-viewer/env/.env.AWS_SQLSERVER_NON_INTEGRATED
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
3 changes: 3 additions & 0 deletions containers/ecr-viewer/env/.env.AZURE_INTEGRATED
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
5 changes: 5 additions & 0 deletions containers/ecr-viewer/env/.env.AZURE_PG_NON_INTEGRATED
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
2 changes: 1 addition & 1 deletion containers/ecr-viewer/environment.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable unused-imports/no-unused-vars */
namespace NodeJS {
interface ProcessEnv {
APP_ENV: "test" | "dev" | "middleware" | "prod";
AWS_ACCESS_KEY_ID: string;
AWS_CUSTOM_ENDPOINT: string;
AWS_REGION: string;
Expand All @@ -15,6 +14,7 @@ namespace NodeJS {
GITHUB_SECRET: string;
METADATA_DATABASE_SCHEMA?: "core" | "extended";
METADATA_DATABASE_TYPE?: "postgres" | "sqlserver";
NBS_AUTH: "true" | "false";
NBS_PUB_KEY: string;
NEXT_PUBLIC_NON_INTEGRATED_VIEWER: "true" | "false";
NEXT_RUNTIME: string;
Expand Down
1 change: 1 addition & 0 deletions containers/ecr-viewer/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const createJestConfig = nextJest({
const customJestConfig = {
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
testEnvironment: "jest-environment-jsdom",
modulePathIgnorePatterns: ["<rootDir>/.next"],
moduleNameMapper: {
"^mssql$": "<rootDir>/src/app/tests/__mocks__/mssql.js",
"^tedious$": "<rootDir>/src/app/tests/__mocks__/mssql.js",
Expand Down
9 changes: 5 additions & 4 deletions containers/ecr-viewer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions containers/ecr-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Collaborator

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

"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",
Expand Down Expand Up @@ -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",
Expand Down
9 changes: 9 additions & 0 deletions containers/ecr-viewer/seed-scripts/azurite.Dockerfile
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.

10 changes: 8 additions & 2 deletions containers/ecr-viewer/seed-scripts/create-seed-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ def _process_files(args):
requests = []
folder_paths = []
configName = "integrated.json"
if os.getenv("METADATA_DATABASE_SCHEMA") == "extended":
if (
os.getenv("COLLECTION") == "AWS_SQLSERVER_NON_INTEGRATED"
or os.getenv("COLLECTION") == "AZURE_SQLSERVER_NON_INTEGRATED"
):
configName = "non-integrated-extended.json"
elif os.getenv("METADATA_DATABASE_SCHEMA") == "core":
elif (
os.getenv("COLLECTION") == "AZURE_PG_NON_INTEGRATED"
or os.getenv("COLLECTION") == "AWS_PG_NON_INTEGRATED"
):
configName = "non-integrated-core.json"

def _process_eicrs(subfolder, folder, folder_path, payload):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ services:
volumes:
- ./baseECR:/code/baseECR
environment:
- METADATA_DATABASE_SCHEMA=${METADATA_DATABASE_SCHEMA}
- COLLECTION=${COLLECTION}
Loading
Loading