aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/emcoui/README.md
blob: 05a43237af1226477efa59e064b178963ff463b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# EMCOUI

This is a web app for EMCO V2 api's. This is a reactjs based UI app created using google material ui library.

## Local setup

for running the app in a local setup first install the dependencies by running

```bash
npm install
```

Then run

```bash
startup.sh
```

## Production build

for creating a production build, run

```bash
npm run build
```

A production ready build will be available at /build directory

## Available scripts

### `startup.sh`

This script basically calls npm start.
This script runs the app in the development mode.<br />
Before running the script update the backend address if backend is not running locally.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.<br />
You will also see any lint errors in the console.

### `npm run build`

Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.<br />

## Building docker image

To build a docker image run the below command

```bash
docker build -t <image_name>:<image_version> .
```

## Installing with helm

All the helm chars are in `helm` directory.

Update values.yaml in `helm` directory with the required emcoui image and then run

```bash
helm install --name <app name> --namespace < namespace >
```