Skip to content

Commit d8291fb

Browse files
casinXanatolystansler
authored andcommitted
fix(ui): add development instructions to README to get started with UI
1 parent 4aa9ae9 commit d8291fb

File tree

5 files changed

+268
-1947
lines changed

5 files changed

+268
-1947
lines changed

ui/README.md

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,71 @@
11
# Database Lab Engine and Database Lab Engine UI
22

33
## Database Lab - thin database clones for faster development
4+
45
_Proceed to [Database Lab Engine repository](https://gitlab.com/postgres-ai/database-lab) for more information about technology itself._
56
Database Lab Engine (DLE) is an open-source (AGPLv3) technology that allows blazing-fast cloning of Postgres databases of any size in seconds. This helps solve many problems such as:
7+
68
- build dev/QA/staging environments involving full-size production-like databases,
79
- provide temporary full-size database clones for SQL query analysis optimization,
810
- automatically verify database migrations (DB schema changes) and massive data operations in CI/CD pipelines to minimize risks of downtime and performance degradation.
911

1012
As an example, cloning a 10 TiB PostgreSQL database can take less than 2 seconds.
1113

1214
## Development
15+
1316
### List packages:
17+
1418
- `@postgres.ai/platform` - platform version of UI
1519
- `@postgres.ai/ce` - community edition version of UI
1620
- `@postgres.ai/shared` - common modules
1721

1822
### How to operate
23+
1924
At the root:
25+
2026
- `<npm command> -ws` - for all packages
2127
- `<npm command> -w <package-name>` - for specific package
2228

2329
#### Examples
30+
2431
- `npm ci -ws` - install deps of all packages
25-
- `npm build -ws` - build all packages
26-
- `npm start -w @postgres.ai/platform` - run platform UI locally in dev mode
27-
- `npm start -w @postgres.ai/ce` - run community edition UI locally in dev mode
32+
- `npm run build -ws` - build all packages
33+
- `npm run start -w @postgres.ai/platform` - run platform UI locally in dev mode
34+
- `npm run start -w @postgres.ai/ce` - run community edition UI locally in dev mode
2835

2936
_Important note: don't use commands for `@postgres.ai/shared` - it's dependent package, which can't be running or built_
3037

31-
### How to start
32-
- `npm ci -ws`
33-
- `npm start -w @postgres.ai/platform` or `npm start -w @postgres.ai/ce`
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
3445

35-
### How to build
36-
- `npm ci -ws`
37-
- `npm build -ws`
46+
### How to start "ce"
47+
48+
- `cd ui`
49+
- `npm ci -ws` - install dependencies, must be done once to install dependencies for all packages
50+
- `npm run start -w @postgres.ai/ce` - start dev server
51+
52+
### How to build "platform"
53+
54+
- `cd ui`
55+
- `npm ci -ws` - install dependencies, must be done once to install dependencies for all packages
56+
- `source packages/platform/deploy/configs/production.sh` - set up environment variables, should be run for each new terminal session
57+
- `npm run build -w @postgres.ai/platform`
58+
59+
### How to build "ce"
60+
61+
- `cd ui`
62+
- `npm ci -ws` - install dependencies, must be done once to install dependencies for all packages
63+
- `npm run build -w @postgres.ai/ce` - start dev server
3864

3965
### CI pipelines for UI code
66+
4067
To deploy UI changes, tag the commit with `ui/` prefix and push it. For example:
68+
4169
```shell
4270
git tag ui/1.0.12
4371
git push origin ui/1.0.12

0 commit comments

Comments
 (0)