Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #586 from sarbull/main
Browse files Browse the repository at this point in the history
Docker fix
  • Loading branch information
sarbull authored Apr 21, 2023
2 parents dc8ebe1 + 37d8e0c commit 0b171e3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ FROM node:16.13.0 AS builder

WORKDIR /app
COPY . /app
RUN npm install && npm run build:docker

RUN npm install && npm run build

# Stage 2 - Containerize
FROM nginx:1.19.0
Expand Down
8 changes: 7 additions & 1 deletion about.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
const fs = require('fs');
const packageJson = require('./package.json');
const revision = require('child_process')
let revision = '';

try {
revision = require('child_process')
.execSync('git rev-parse HEAD')
.toString().trim();
} catch(e) {
revision = 'Revision not found';
}

let about = {
name: packageJson.name,
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
"name": "@lfai/egeria-ui",
"version": "4.1.2",
"scripts": {
"preinstall": "node preinstall.js",
"start": "react-scripts start",
"build": "react-scripts build",
"build:docker": "react-scripts build",
"eject": "react-scripts eject",
"lint": "eslint --debug 'src/**/*.{js,jsx,ts,tsx}'",
"postbuild": "node about.js",
"test": "react-scripts test --watchAll=false",
"eject": "react-scripts eject"
"preinstall": "node preinstall.js",
"start": "react-scripts start",
"test": "react-scripts test --watchAll=false"
},
"eslintConfig": {
"extends": [
Expand Down

0 comments on commit 0b171e3

Please sign in to comment.