From fc96a4986dfdcdf159eb7ec89e08990221352d82 Mon Sep 17 00:00:00 2001 From: Matthew Walowski Date: Wed, 29 Jan 2025 19:11:48 -0600 Subject: [PATCH 1/3] add local option to frontend --- Dockerfile | 5 +- apps/backend/src/middleware/responses.ts | 1 + apps/frontend/public/index.html | 2 +- apps/frontend/webpack.config.mjs | 171 ++++++++++++----------- 4 files changed, 95 insertions(+), 84 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9a01db16..c5d56d96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,13 +40,14 @@ RUN pnpm install # Copy code COPY . . -ARG PROJECT_NAME hearing +ARG PROJECT_NAME=hearing +ARG BUILD_ENV=production # For some reason we need to build types first. Turbo should be able to figure this # Build everything, then build the frontend for the specific project RUN pnpm run build --filter types RUN pnpm run build --filter='!frontend' WORKDIR /app/apps/frontend -RUN pnpm run build:${PROJECT_NAME} +RUN pnpm run build:${PROJECT_NAME} --env $BUILD_ENV # ----------------------------------------------- # Runtime Image diff --git a/apps/backend/src/middleware/responses.ts b/apps/backend/src/middleware/responses.ts index d63b1b47..d245ef75 100644 --- a/apps/backend/src/middleware/responses.ts +++ b/apps/backend/src/middleware/responses.ts @@ -7,6 +7,7 @@ const SRC_SELF = ["'self'", 'blob:', 'data:'] // Describes cognito origins const SRC_COGNITO = [ 'https://cognito-idp.eu-north-1.amazonaws.com/', + 'https://3dp4me-dev.auth.eu-north-1.amazoncognito.com/oauth2/token', 'https://3dp4me-users.auth.eu-north-1.amazoncognito.com/oauth2/token', 'https://3dp4me-prosthetic-users.auth.eu-north-1.amazoncognito.com/oauth2/token', 'https://cognito-identity.eu-north-1.amazonaws.com/', diff --git a/apps/frontend/public/index.html b/apps/frontend/public/index.html index f2dbe3fb..17554a40 100644 --- a/apps/frontend/public/index.html +++ b/apps/frontend/public/index.html @@ -24,7 +24,7 @@ manifest.json provides metadata used when your web app is installed on a user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ --> - + - +