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
Support .env for dev/debug purposes. Clarify how to start Platform UI locally for dev/debugging, with predefined JWT
See merge request postgres-ai/database-lab!853
Copy file name to clipboardExpand all lines: ui/README.md
+9-11
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Database Lab Engine and Database Lab Engine UI
1
+
# Database Lab Engine UI and DBLab Platform UI
2
2
3
-
## Database Lab - thin database clones for faster development
3
+
## DBLab - thin database clones and database branching for faster development
4
4
5
5
_Proceed to [Database Lab Engine repository](https://gitlab.com/postgres-ai/database-lab) for more information about technology itself._
6
6
Database Lab Engine (DLE) is an open-source (Apache 2.0) technology that allows blazing-fast cloning of Postgres databases of any size in seconds. This helps solve many problems such as:
@@ -27,24 +27,22 @@ At the root:
27
27
-`<npm command> -w <package-name>` - for specific package
28
28
29
29
#### Examples
30
-
31
30
-`npm ci -ws` - install deps of all packages
32
31
-`npm run build -ws` - build all packages
33
32
-`npm run start -w @postgres.ai/platform` - run platform UI locally in dev mode
34
33
-`npm run start -w @postgres.ai/ce` - run community edition UI locally in dev mode
35
34
36
35
_Important note: don't use commands for `@postgres.ai/shared` - it's dependent package, which can't be running or built_
37
36
38
-
### How to start "platform"
39
-
40
-
-`cd ui`
41
-
-`npm ci -ws` - install dependencies, must be done once to install dependencies for all packages
42
-
-`source packages/platform/deploy/configs/production.sh` - set up environment variables, should be run for each new terminal session
43
-
-`npm run start -w @postgres.ai/platform` - start dev server
44
-
-To sign in locally - sign in on [console.postgres.ai](https://console.postgres.ai) and copy `token` from Local Storage to your localhost's Local Storage
37
+
### How to start Platform UI with a predefined JWT token
38
+
-`cd ui/packages/platform`
39
+
-`cp .env_example_dev .env`
40
+
-edit `.env` setting:
41
+
-`REACT_APP_API_URL_PREFIX` to point to dev API server (e.g., staging API server: `https://v2.postgres.ai/api/general`).
42
+
-`REACT_APP_TOKEN_DEBUG` to have your JWT ready work with the same server. Note that it has an expiration date so it needs to be periodically refreshed.
43
+
-`pnpm run start` - start Platform for local debugging/development
45
44
46
45
### How to start "ce"
47
-
48
46
-`cd ui`
49
47
-`npm ci -ws` - install dependencies, must be done once to install dependencies for all packages
50
48
-`npm run start -w @postgres.ai/ce` - start dev server
0 commit comments