From c7ffb6054274d2bbc4de4df5b5f5947e7e4b9c67 Mon Sep 17 00:00:00 2001 From: John Wu <76966357+jwu-fisker@users.noreply.github.com> Date: Wed, 5 May 2021 17:34:56 -0700 Subject: [PATCH] Merge Development into Main (#37) * Fix sign up form bug * Add run.sh to run setup and run web app * Output node version * Update readme with run.sh * Fix file upload form to handle ota_update service * Enable file upload form Enable error boundary to catch React errors (#7) Fix warning for link noreferrer Include authorization header with file upload * Remove default localhost settings (#8) * Remove default localhost settings Replace with deployment settings * Fix for upload data format * Fix test data for last commit * Fix json link format and remove localhost default settings (#10) * Remove default localhost settings Replace with deployment settings * Fix for upload data format * Fix test data for last commit * Fix link data format * Fix link json again (#12) Use id token instead of access token * nginx things * Web Worker Sign Out and Use Go API (#13) * Calculate checksum and send with file upload * Limit file upload and display rejected file error * Add sign in timeout * Check auth token structure before setting Clean up * Use web worker timer to sign out Remove checksum Point to Go ota update * Remove checksum dependency * Use compute auth service and fix static code analyzer warnings (#15) * Clean up formatting * Use new compute_auth service Implment SSO Implement token refresh Clean up unit tests * Fix unit tests * Fix auth test Fix warnings * Update default settings for compute_auth * Change main UI layout and add VINs to add and upload forms (#16) * Add new upload update package form Add new add vehicle form Add new side menu layout Add new toolbar layout Update and add unit tests * Enable add get and add vehicles * Integration issues with ota_update service * Update get vehicle JSON format * Fix related unit test Add release notes field * Add StatusContext to display error and status messages * Handle api error json (#18) * Handle api error json * Fix get vehicles error handling Update .env.template * Fix signout refresh (#20) * Merge to main (#17) * Fix sign up form bug * Add run.sh to run setup and run web app * Output node version * Update readme with run.sh * Fix file upload form to handle ota_update service * Enable file upload form Enable error boundary to catch React errors (#7) Fix warning for link noreferrer Include authorization header with file upload * Remove default localhost settings (#8) * Remove default localhost settings Replace with deployment settings * Fix for upload data format * Fix test data for last commit * Fix json link format and remove localhost default settings (#10) * Remove default localhost settings Replace with deployment settings * Fix for upload data format * Fix test data for last commit * Fix link data format * Fix link json again (#12) Use id token instead of access token * nginx things * Web Worker Sign Out and Use Go API (#13) * Calculate checksum and send with file upload * Limit file upload and display rejected file error * Add sign in timeout * Check auth token structure before setting Clean up * Use web worker timer to sign out Remove checksum Point to Go ota update * Remove checksum dependency * Use compute auth service and fix static code analyzer warnings (#15) * Clean up formatting * Use new compute_auth service Implment SSO Implement token refresh Clean up unit tests * Fix unit tests * Fix auth test Fix warnings * Update default settings for compute_auth * Change main UI layout and add VINs to add and upload forms (#16) * Add new upload update package form Add new add vehicle form Add new side menu layout Add new toolbar layout Update and add unit tests * Enable add get and add vehicles * Integration issues with ota_update service * Update get vehicle JSON format * Fix related unit test Add release notes field * Add StatusContext to display error and status messages * Handle api error json (#18) * Handle api error json * Fix get vehicles error handling Update .env.template Co-authored-by: Rafi Greenberg * Fix sign out and refresh * Check for bad json Co-authored-by: Rafi Greenberg * Add role checks (#21) * Add role checks * Remove moved Roles enum * Add package updates, car updates, and vehicle screens (#25) * Car table update (#27) * Add Datadog RUM (#28) * fix run.sh * Add updates by car screen and modal popup (#29) * CEC-180 Cache Control (#30) * Set cache expire to 1 day Add snapshot tests for new screens * Fix table pagniation random ids for snapshot tests * Auto reload on chunk load error * OTA Admin Portal => Admin Portal * CEC-179 Car download progress (#32) * Display download progress * Change default * Fix * Fix * Update readme * Update readme and defaults Fix Dockerfile * CEC-179 Car update progress build fix (#33) * Display download progress * Change default * Fix * Fix * Update readme * Update readme and defaults Fix Dockerfile * Fix build * Undo Docker changes (#34) * Dev Docker container (#35) Co-authored-by: Rafi Greenberg Co-authored-by: Roger Standridge --- .dockerignore | 1 - Dockerfile.dev | 12 ++++++++++++ README.md | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 Dockerfile.dev diff --git a/.dockerignore b/.dockerignore index 7363dc7..d95674b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,5 @@ **/.classpath **/.dockerignore -**/.env **/.git **/.gitignore **/.project diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000..b08537a --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,12 @@ +FROM node:12-alpine as builder + +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build + +FROM nginx:alpine + +COPY --from=builder build /usr/share/nginx/html +COPY .env /usr/share/nginx/html/.env +COPY nginx.conf /etc/nginx/conf.d/default.conf \ No newline at end of file diff --git a/README.md b/README.md index f9c3bd2..550e96e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Running locally Running Docker container 1. Copy .env.template to .env and edit the service urls for authentication and api services -2. Build the image `docker build -t fiskerinc/portal .` +2. Build the image `docker build -t fiskerinc/portal --file Dockerfile.dev .` 3. Start the container `docker run -p 3000:80 fiskerinc/portal` 4. Access portal at localhost:3000