You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-16
Original file line number
Diff line number
Diff line change
@@ -27,8 +27,9 @@ Open http://localhost:8765 to view it in the browser.
27
27
-e MON_PORT=8765 \
28
28
cr.yandex/yc/yandex-docker-local-ydb:latest
29
29
```
30
-
2. Run the frontend app in the development mode, via invoking `npm run dev`
31
-
3. Open [localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.\
30
+
2. Install dependencies with `npm ci`
31
+
3. Run the frontend app in the development mode, via invoking `npm run dev`
32
+
4. Open [localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.\
32
33
You will also see any lint errors in the console.
33
34
34
35
For API reference, open Swagger UI on http://localhost:8765/viewer/api/.
@@ -43,26 +44,45 @@ To test new features, you can use ydb version that is currently in testing mode
43
44
or use a build from `main` brunch with `ghcr.io/ydb-platform/local-ydb:trunk` image.
44
45
Also you can set specific version like `cr.yandex/yc/yandex-docker-local-ydb:23.1`
45
46
46
-
### Custom backend in dev mode
47
+
### Custom configuration in dev mode with .env file
47
48
48
-
YDB docker represents a single node cluster with only one version, small amount of storage groups, PDisks and VDisks. It may be not enough for development purposes. If you have your own development cluster with sufficient amount of entities, you can run the app in the dev mode with this cluster as backend. To do it, set you host to `REACT_APP_BACKEND` variable in `dev` script. For example:
49
+
You can run the app with your own params by adding `.env` file to project root. There is an example in `.env.example`.
50
+
51
+
1. Add `.env` file to project root by copying example
52
+
53
+
```shell script
54
+
cp .env.example .env
55
+
```
56
+
57
+
2. Set your own set of params in `.env`
58
+
3. Run `npm run start`. Your custom params from `.env` file will be applied
59
+
60
+
#### Custom backend in dev mode
61
+
62
+
YDB docker represents a single node cluster with only one version, small amount of storage groups, PDisks and VDisks. It may be not enough for development purposes. If you have your own development cluster with sufficient amount of entities, you can run the app in the dev mode with this cluster as backend. To do it, alter `REACT_APP_BACKEND` param in your `.env` file:
If you have meta backend, you can run the app in dev mode with this backend like this:
72
+
If you have meta backend for multi cluster version, you can run the app in dev mode with this backend by setting `REACT_APP_META_BACKEND` param in `.env`:
4. Open [embedded YDB UI](http://localhost:8765/monitoring) to view it in the browser.
102
123
103
124
### Testing production bundle with specific cluster host
104
125
105
126
If you want to test embedded version in production mode, but YDB docker is not enough and you have your own ydb development cluster, you can manually update UI for the specific cluster host.
106
127
107
128
It also could be usefull for development purposes, because some operations, that are not 'read-only', like some update queries or tablets restart could be allowed by CORS only for the same origin and so could not be executed in dev mode.
108
129
109
-
1. Create production bundle with `npm run build:embedded`
110
-
2. Copy your build files from `build` folder to `/contentmonitoring` folder on desired cluster host
111
-
3. Open `http://your-cluster-host:8765/monitoring` to see updated UI
130
+
1. Install dependencies with `npm ci`
131
+
2. Create production bundle with `npm run build:embedded`
132
+
3. Copy your build files from `build` folder to `/contentmonitoring` folder on desired cluster host
133
+
4. Open `http://your-cluster-host:8765/monitoring` to see updated UI
112
134
113
135
It's assumed, that you have all the necessary access rights to update files on the host.
0 commit comments