diff --git a/docker-compose.yml b/docker-compose.yml index c80cc0dda..dc8407b0b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,18 +1,9 @@ -version: "3.7" - services: frontend: build: frontend ports: - "3001:3001" - environment: - - REACT_APP_AI_CONNECTION_STRING= - - REACT_APP_BACKEND_URL=http://localhost:8000 - - REACT_APP_BACKEND_API_SCOPE=api://ea4c7b92-47b3-45fb-bd25-a8070f0c495c/user_impersonation - - REACT_APP_FRONTEND_URL=http://localhost:3001 - - REACT_APP_FRONTEND_BASE_ROUTE= - - REACT_APP_AD_CLIENT_ID=f5993820-b7e2-4791-886f-f9f5027dc7be - - REACT_APP_AD_TENANT_ID=3aa4a235-b6e2-48d5-9195-7fcf05b459b0 + env_file: "frontend/.env" broker: build: context: broker diff --git a/frontend/Dockerfile b/frontend/Dockerfile index b3caf414a..dec12f38f 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM node:alpine as build +FROM node:alpine AS build WORKDIR /app diff --git a/frontend/src/config.ts b/frontend/src/config.ts index 5eb1285c1..f0e8b03bd 100644 --- a/frontend/src/config.ts +++ b/frontend/src/config.ts @@ -9,7 +9,7 @@ const getEnvVariable = (name: string): string => { // If global value equals its placeholder value 'placeholderValue', it is considered undefined const placeholderValue: string = '${' + name + '}' - if (globalValue === placeholderValue || !globalValue) + if (globalValue === placeholderValue || globalValue === undefined) throw new Error( `Global variable "${name}" is not set. Verify that your .env file is up to date with .env.example` )