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
+13-42Lines changed: 13 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,42 +13,36 @@ Knowhere API Dashboard is the Next.js web application for managing Knowhere API
13
13
- PostgreSQL for the dashboard auth and account database
14
14
- A reachable Knowhere API backend
15
15
16
-
## Local Setup
16
+
## Local Development
17
17
18
-
Install dependencies:
18
+
Install dependencies and create your local environment file:
19
19
20
20
```bash
21
21
pnpm install
22
+
cp .env.example .env.local
22
23
```
23
24
24
-
Create local environment configuration:
25
+
Fill in the required values in `.env.local`. For most local work, the important values are:
25
26
26
-
```bash
27
-
cp .env.example .env.local
28
-
```
27
+
-`DATABASE_URL`: PostgreSQL database used by the dashboard.
28
+
-`NEXT_PUBLIC_API_URL`: Knowhere API backend URL.
29
+
-`NEXT_PUBLIC_APP_URL` and `BETTER_AUTH_URL`: usually `http://localhost:3000`.
30
+
-`BETTER_AUTH_SECRET`: any random secret with at least 32 characters.
29
31
30
-
Fill in the required values in `.env.local`, then start the development server:
32
+
Start the development server:
31
33
32
34
```bash
33
35
pnpm dev
34
36
```
35
37
36
38
The app runs on `http://localhost:3000` by default.
37
39
38
-
## Self-hosted Dashboard Flow
39
-
40
-
For the combined open-source stack, start the dashboard migration/bootstrap step before the API service runs its Alembic migrations. The dashboard owns the Better Auth user/auth schema and provides the normal first-user registration flow.
41
-
42
-
The default self-hosted flow is:
40
+
## Self-hosted
43
41
44
-
1. Start PostgreSQL, Redis, object storage, and other shared dependencies.
45
-
2. Start the dashboard migration/bootstrap step so Better Auth tables exist.
46
-
3. Start the API with standalone mode disabled, then run API migrations.
47
-
4. Register or sign in through the dashboard with email and password, or use Resend-backed magic-link login when email delivery is configured.
48
-
5. Create and manage API keys from the dashboard.
49
-
6. Process jobs through the API/worker with dashboard billing disabled.
42
+
For self-hosted deployment, use the combined stack in the dedicated repository:
43
+
https://github.com/Ontos-AI/knowhere-self-hosted
50
44
51
-
Use `BILLING_ENABLED=false` for the open-source self-hosted dashboard unless the matching paid billing endpoints are deployed and configured.
45
+
This dashboard repository is useful when developing the web app directly. The self-hosted repository owns the end-to-end local stack and deployment instructions.
52
46
53
47
## Environment Variables
54
48
@@ -122,26 +116,3 @@ The image runs the standard Next.js Node server with `pnpm start`. Runtime confi
122
116
The public workflow runs lint, type-check, tests, and build on pull requests and pushes to `main` and `staging`.
123
117
124
118
This repository does not publish standalone public dashboard images. Public self-hosted image publishing is handled by the combined self-hosted release workflow.
125
-
126
-
## Deployment
127
-
128
-
Merging a pull request into `staging` or `main` triggers `.github/workflows/deploy.yml` through the branch push created by the merge. The workflow builds the dashboard image, pushes it to the configured AWS image registry, and updates the configured Kubernetes deployment with `kubectl set image`.
129
-
130
-
DevOps must configure these GitHub repository secrets:
131
-
132
-
| Name | Purpose |
133
-
| --- | --- |
134
-
|`AWS_ACCESS_KEY_ID`| AWS principal allowed to push images and update the cluster. |
135
-
|`AWS_SECRET_ACCESS_KEY`| Secret key for the AWS principal. |
136
-
|`AWS_EKS_PROD_CLUSTER_NAME`| Kubernetes cluster name used by `aws eks update-kubeconfig`. |
137
-
|`AWS_EKS_PROD_REGION`| AWS region for the image registry and cluster. |
138
-
|`DASHBOARD_IMAGE_REGISTRY`| Registry host, for example an AWS account registry host. |
139
-
|`DASHBOARD_IMAGE_REPOSITORY`| Dashboard image repository path inside the registry. |
140
-
|`DASHBOARD_KUBE_CONTAINER`| Container name inside the dashboard Deployment. |
|`DASHBOARD_KUBE_NAMESPACE_STAGING`| Namespace updated when `staging` is deployed. |
143
-
|`DASHBOARD_KUBE_NAMESPACE_PROD`| Namespace updated when `main` is deployed. |
144
-
145
-
The AWS principal must be able to authenticate to the image registry, push the dashboard image, call `eks:DescribeCluster`, and update the target deployment. The cluster must be able to pull the pushed image.
146
-
147
-
Runtime environment variables are still injected by the deployment platform, not by the Docker build. Because the container runs `pnpm db:generate` and `pnpm db:migrate` before `pnpm start`, the deployed pod must have `DATABASE_URL` and the required auth/app URL environment variables at startup. The container filesystem must allow writes to the app directory unless the migration generation step is moved out of container startup.
0 commit comments