|
1 | 1 | # Database Lab Engine and Database Lab Engine UI
|
2 | 2 |
|
3 | 3 | ## Database Lab - thin database clones for faster development
|
| 4 | + |
4 | 5 | _Proceed to [Database Lab Engine repository](https://gitlab.com/postgres-ai/database-lab) for more information about technology itself._
|
5 | 6 | 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 | + |
6 | 8 | - build dev/QA/staging environments involving full-size production-like databases,
|
7 | 9 | - provide temporary full-size database clones for SQL query analysis optimization,
|
8 | 10 | - automatically verify database migrations (DB schema changes) and massive data operations in CI/CD pipelines to minimize risks of downtime and performance degradation.
|
9 | 11 |
|
10 | 12 | As an example, cloning a 10 TiB PostgreSQL database can take less than 2 seconds.
|
11 | 13 |
|
12 | 14 | ## Development
|
| 15 | + |
13 | 16 | ### List packages:
|
| 17 | + |
14 | 18 | - `@postgres.ai/platform` - platform version of UI
|
15 | 19 | - `@postgres.ai/ce` - community edition version of UI
|
16 | 20 | - `@postgres.ai/shared` - common modules
|
17 | 21 |
|
18 | 22 | ### How to operate
|
| 23 | + |
19 | 24 | At the root:
|
| 25 | + |
20 | 26 | - `<npm command> -ws` - for all packages
|
21 | 27 | - `<npm command> -w <package-name>` - for specific package
|
22 | 28 |
|
23 | 29 | #### Examples
|
| 30 | + |
24 | 31 | - `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 |
28 | 35 |
|
29 | 36 | _Important note: don't use commands for `@postgres.ai/shared` - it's dependent package, which can't be running or built_
|
30 | 37 |
|
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 |
34 | 45 |
|
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 |
38 | 64 |
|
39 | 65 | ### CI pipelines for UI code
|
| 66 | + |
40 | 67 | To deploy UI changes, tag the commit with `ui/` prefix and push it. For example:
|
| 68 | + |
41 | 69 | ```shell
|
42 | 70 | git tag ui/1.0.12
|
43 | 71 | git push origin ui/1.0.12
|
|
0 commit comments