@nocobase/plugin-ai 2.1.0-beta.46 → 2.1.0-beta.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/docs/nocobase/api/cli/app/restart.md +1 -3
- package/dist/ai/docs/nocobase/api/cli/app/start.md +1 -7
- package/dist/ai/docs/nocobase/api/cli/config/delete.md +7 -5
- package/dist/ai/docs/nocobase/api/cli/config/get.md +7 -5
- package/dist/ai/docs/nocobase/api/cli/config/index.md +38 -18
- package/dist/ai/docs/nocobase/api/cli/config/set.md +9 -7
- package/dist/ai/docs/nocobase/api/cli/env/index.md +19 -20
- package/dist/ai/docs/nocobase/api/cli/env/update.md +72 -72
- package/dist/ai/docs/nocobase/api/cli/index.md +0 -1
- package/dist/ai/docs/nocobase/api/cli/init.md +30 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/current.md +33 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/generate.md +54 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/index.md +60 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/info.md +42 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/reload.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/restart.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/start.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/status.md +36 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/stop.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/use.md +38 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/index.md +124 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/current.md +33 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/generate.md +62 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/index.md +60 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/info.md +43 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/reload.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/restart.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/start.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/status.md +36 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/stop.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/use.md +38 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-external-nocobase/index.md +157 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-manager/index.md +5 -0
- package/dist/ai/docs/nocobase/ops-management/version-control/index.md +79 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-version-control/index.md +14 -0
- package/dist/ai/docs/nocobase/quickstart/production/index.md +75 -69
- package/dist/ai/docs/nocobase/quickstart/production/reverse-proxy/caddy.md +211 -80
- package/dist/ai/docs/nocobase/quickstart/production/reverse-proxy/index.md +72 -53
- package/dist/ai/docs/nocobase/quickstart/production/reverse-proxy/nginx.md +186 -89
- package/dist/client/{290.0888139e33c9b7cb.js → 290.0f7f441d8a94f03c.js} +1 -1
- package/dist/client/{428.431a00d29107058e.js → 428.fdd0cc3cfd1632ef.js} +1 -1
- package/dist/client/ai-employees/chatbox/hooks/useChat.d.ts +14 -14
- package/dist/client/ai-employees/chatbox/stores/chat-box.d.ts +1 -105
- package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +1 -37
- package/dist/client/ai-employees/chatbox/stores/chat-messages.d.ts +1 -109
- package/dist/client/index.js +3 -3
- package/dist/client-v2/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +17 -0
- package/dist/client-v2/ai-employees/chatbox/stores/chat-box.d.ts +113 -0
- package/dist/client-v2/ai-employees/chatbox/stores/chat-conversations.d.ts +45 -0
- package/dist/client-v2/ai-employees/chatbox/stores/chat-messages.d.ts +118 -0
- package/dist/client-v2/ai-employees/chatbox/stores/create-selectors.d.ts +18 -0
- package/dist/client-v2/ai-employees/chatbox/stores/global-store.d.ts +9 -0
- package/dist/client-v2/ai-employees/types.d.ts +151 -0
- package/dist/client-v2/index.d.ts +8 -1
- package/dist/client-v2/index.js +1 -1
- package/dist/client-v2/repositories/AIConfigRepository.d.ts +81 -0
- package/dist/client-v2/repositories/hooks/useAIConfigRepository.d.ts +10 -0
- package/dist/collections/ai-context-datasource.js +1 -0
- package/dist/externalVersion.js +16 -16
- package/dist/node_modules/@langchain/xai/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/collections/ai-conversations.js +1 -0
- package/dist/server/collections/ai-employees.js +1 -0
- package/dist/server/collections/ai-files.js +1 -0
- package/dist/server/collections/ai-messages.js +1 -0
- package/dist/server/collections/ai-settings.js +1 -0
- package/dist/server/collections/ai-tool-messages.js +1 -0
- package/dist/server/collections/lc-checkpoint-blobs.js +1 -0
- package/dist/server/collections/lc-checkpoint-writes.js +1 -0
- package/dist/server/collections/lc-checkpoints.js +1 -0
- package/dist/server/collections/llm-services.js +1 -0
- package/dist/server/collections/users-ai-employees.js +1 -0
- package/package.json +2 -2
- package/dist/ai/docs/nocobase/ai/install-upgrade-migration.mdx +0 -402
- package/dist/ai/docs/nocobase/api/cli/env/proxy/caddy.md +0 -108
- package/dist/ai/docs/nocobase/api/cli/env/proxy/index.md +0 -54
- package/dist/ai/docs/nocobase/api/cli/env/proxy/nginx.md +0 -104
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy caddy current"
|
|
3
|
+
description: "nb proxy caddy current command reference: print the current Caddy provider driver."
|
|
4
|
+
keywords: "nb proxy caddy current,NocoBase CLI,caddy,driver"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy caddy current
|
|
8
|
+
|
|
9
|
+
Print the current Caddy provider driver.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb proxy caddy current
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Output
|
|
18
|
+
|
|
19
|
+
The command prints one value directly:
|
|
20
|
+
|
|
21
|
+
- `local`
|
|
22
|
+
- `docker`
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
nb proxy caddy current
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Related commands
|
|
31
|
+
|
|
32
|
+
- [`nb proxy caddy use`](./use.md)
|
|
33
|
+
- [`nb proxy caddy info`](./info.md)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy caddy generate"
|
|
3
|
+
description: "nb proxy caddy generate command reference: generate or refresh the Caddy config for one CLI-managed env."
|
|
4
|
+
keywords: "nb proxy caddy generate,NocoBase CLI,caddy,reverse proxy,proxy configuration"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy caddy generate
|
|
8
|
+
|
|
9
|
+
Generate or refresh the Caddy entry config for one CLI-managed env.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb proxy caddy generate --env <name> [--host <domain>] [--port <port>]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `--env`, `-e` | string | CLI-managed env name to generate the config for |
|
|
22
|
+
| `--host` | string | Host written into the site address, such as `app1.example.com` |
|
|
23
|
+
| `--port` | string | Listen port written into the site address, such as `8080` |
|
|
24
|
+
|
|
25
|
+
## Generated files
|
|
26
|
+
|
|
27
|
+
Using env `test2` as an example, the command typically maintains these files and directories:
|
|
28
|
+
|
|
29
|
+
- `NB_CLI_ROOT/.nocobase/proxy/caddy/nocobase.caddy`
|
|
30
|
+
- `NB_CLI_ROOT/.nocobase/proxy/caddy/test2/app.caddy`
|
|
31
|
+
- `NB_CLI_ROOT/.nocobase/proxy/caddy/test2/public/index-v1.html`
|
|
32
|
+
- `NB_CLI_ROOT/.nocobase/proxy/caddy/test2/public/index-v2.html`
|
|
33
|
+
|
|
34
|
+
In the current design, `app.caddy` is already the complete site config for one env and is no longer split into a separate `generated.caddy` file.
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
nb proxy caddy generate --env demo --host demo.local.nocobase.com
|
|
40
|
+
nb proxy caddy generate --env demo --host demo.local.nocobase.com --port 8080
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Notes
|
|
44
|
+
|
|
45
|
+
- `generate` only writes or refreshes config and does not automatically start Caddy
|
|
46
|
+
- Regenerating config overwrites `app.caddy` as a whole
|
|
47
|
+
- If you change settings such as `app-port` or `app-public-path` with `nb env update`, you will usually need to rerun this command
|
|
48
|
+
- Only CLI-managed `local` or `docker` envs can use this command
|
|
49
|
+
|
|
50
|
+
## Related commands
|
|
51
|
+
|
|
52
|
+
- [`nb proxy caddy start`](./start.md)
|
|
53
|
+
- [`nb proxy caddy reload`](./reload.md)
|
|
54
|
+
- [`nb env update`](../../env/update.md)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy caddy"
|
|
3
|
+
description: "nb proxy caddy command-group reference: manage the Caddy provider driver, config generation, and runtime control."
|
|
4
|
+
keywords: "nb proxy caddy,NocoBase CLI,caddy,reverse proxy,proxy configuration"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy caddy
|
|
8
|
+
|
|
9
|
+
`nb proxy caddy` is the command-group entry for the Caddy provider.
|
|
10
|
+
|
|
11
|
+
If you already have a domain, want to get HTTPS running quickly, and do not want to maintain too many TLS details yourself, this is usually the place to start. It handles two things:
|
|
12
|
+
|
|
13
|
+
- choosing how Caddy runs, which means `local` or `docker`
|
|
14
|
+
- generating, starting, reloading, and inspecting the Caddy entrypoint for CLI-managed envs
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
nb proxy caddy <command>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Subcommands
|
|
23
|
+
|
|
24
|
+
| Command | Description |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| [`nb proxy caddy use`](./use.md) | Switch the Caddy driver |
|
|
27
|
+
| [`nb proxy caddy current`](./current.md) | Print the current driver |
|
|
28
|
+
| [`nb proxy caddy generate`](./generate.md) | Generate or refresh the Caddy config for one env |
|
|
29
|
+
| [`nb proxy caddy start`](./start.md) | Start the Caddy proxy |
|
|
30
|
+
| [`nb proxy caddy restart`](./restart.md) | Restart the Caddy proxy |
|
|
31
|
+
| [`nb proxy caddy reload`](./reload.md) | Reload the Caddy config |
|
|
32
|
+
| [`nb proxy caddy stop`](./stop.md) | Stop the Caddy proxy |
|
|
33
|
+
| [`nb proxy caddy status`](./status.md) | Show Caddy runtime status |
|
|
34
|
+
| [`nb proxy caddy info`](./info.md) | Show driver, config paths, and runtime info |
|
|
35
|
+
|
|
36
|
+
## Notes
|
|
37
|
+
|
|
38
|
+
- The current driver is stored in `proxy.caddy-driver`
|
|
39
|
+
- The default driver is `local`
|
|
40
|
+
- The local driver uses the executable pointed to by `bin.caddy`, whose default value is `caddy`
|
|
41
|
+
- The Docker driver uses `caddy:latest`
|
|
42
|
+
- The default Docker container name is `<docker.container-prefix>-caddy-proxy`
|
|
43
|
+
- The Docker driver mounts host `NB_CLI_ROOT` into the container at `/apps`
|
|
44
|
+
|
|
45
|
+
## Typical workflow
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
nb proxy caddy use local
|
|
49
|
+
nb proxy caddy generate --env app1 --host app1.example.com
|
|
50
|
+
nb proxy caddy start
|
|
51
|
+
nb proxy caddy status
|
|
52
|
+
nb proxy caddy info
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Related commands
|
|
56
|
+
|
|
57
|
+
- [`nb proxy`](../index.md)
|
|
58
|
+
- [`nb proxy nginx`](../nginx/index.md)
|
|
59
|
+
- [`nb env update`](../../env/update.md)
|
|
60
|
+
- [`nb config`](../../config/index.md)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy caddy info"
|
|
3
|
+
description: "nb proxy caddy info command reference: show the current Caddy provider driver, config paths, and runtime details."
|
|
4
|
+
keywords: "nb proxy caddy info,NocoBase CLI,caddy,paths,configuration"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy caddy info
|
|
8
|
+
|
|
9
|
+
Show the current Caddy provider driver, config paths, and runtime details.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb proxy caddy info
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Output
|
|
18
|
+
|
|
19
|
+
The output usually includes these fields:
|
|
20
|
+
|
|
21
|
+
- `driver`
|
|
22
|
+
- `configFile`
|
|
23
|
+
- `runtimeRoot`
|
|
24
|
+
- `upstreamHost`
|
|
25
|
+
- `caddyBinary` or `container`
|
|
26
|
+
- `image`
|
|
27
|
+
|
|
28
|
+
Where:
|
|
29
|
+
|
|
30
|
+
- with the `local` driver, the output shows `caddyBinary`
|
|
31
|
+
- with the `docker` driver, the output shows `container` and `image`
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
nb proxy caddy info
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Related commands
|
|
40
|
+
|
|
41
|
+
- [`nb proxy caddy current`](./current.md)
|
|
42
|
+
- [`nb proxy caddy status`](./status.md)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy caddy reload"
|
|
3
|
+
description: "nb proxy caddy reload command reference: reload the Caddy config with the current driver."
|
|
4
|
+
keywords: "nb proxy caddy reload,NocoBase CLI,caddy,reload"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy caddy reload
|
|
8
|
+
|
|
9
|
+
Reload the Caddy config with the current driver.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb proxy caddy reload
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
nb proxy caddy reload
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Notes
|
|
24
|
+
|
|
25
|
+
- This command is typically used after you regenerate the config
|
|
26
|
+
- `reload` requires Caddy to already be running; if it is not running yet, use `nb proxy caddy start` first
|
|
27
|
+
- The local driver reloads local Caddy, and the Docker driver reloads Caddy inside the container
|
|
28
|
+
|
|
29
|
+
## Related commands
|
|
30
|
+
|
|
31
|
+
- [`nb proxy caddy generate`](./generate.md)
|
|
32
|
+
- [`nb proxy caddy start`](./start.md)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy caddy restart"
|
|
3
|
+
description: "nb proxy caddy restart command reference: restart the Caddy proxy with the current driver."
|
|
4
|
+
keywords: "nb proxy caddy restart,NocoBase CLI,caddy,restart"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy caddy restart
|
|
8
|
+
|
|
9
|
+
Restart the Caddy proxy with the current driver.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb proxy caddy restart
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
nb proxy caddy restart
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Notes
|
|
24
|
+
|
|
25
|
+
- This command stops the proxy first and then starts it again
|
|
26
|
+
- With `local` or `docker`, it operates on the local process or Docker container for the current driver
|
|
27
|
+
|
|
28
|
+
## Related commands
|
|
29
|
+
|
|
30
|
+
- [`nb proxy caddy start`](./start.md)
|
|
31
|
+
- [`nb proxy caddy stop`](./stop.md)
|
|
32
|
+
- [`nb proxy caddy reload`](./reload.md)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy caddy start"
|
|
3
|
+
description: "nb proxy caddy start command reference: start the Caddy proxy with the current driver."
|
|
4
|
+
keywords: "nb proxy caddy start,NocoBase CLI,caddy,start"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy caddy start
|
|
8
|
+
|
|
9
|
+
Start the Caddy proxy with the current driver.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb proxy caddy start
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
nb proxy caddy start
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Notes
|
|
24
|
+
|
|
25
|
+
- With the `local` driver, this starts the local Caddy process
|
|
26
|
+
- With the `docker` driver, this starts or creates the Docker container
|
|
27
|
+
- If the proxy is already running, the command reports that it is already running
|
|
28
|
+
|
|
29
|
+
## Related commands
|
|
30
|
+
|
|
31
|
+
- [`nb proxy caddy stop`](./stop.md)
|
|
32
|
+
- [`nb proxy caddy status`](./status.md)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy caddy status"
|
|
3
|
+
description: "nb proxy caddy status command reference: show the current Caddy proxy runtime status."
|
|
4
|
+
keywords: "nb proxy caddy status,NocoBase CLI,caddy,status"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy caddy status
|
|
8
|
+
|
|
9
|
+
Show the current Caddy proxy runtime status.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb proxy caddy status
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Output
|
|
18
|
+
|
|
19
|
+
The output usually includes:
|
|
20
|
+
|
|
21
|
+
- `driver`
|
|
22
|
+
- `status`
|
|
23
|
+
- `config`
|
|
24
|
+
- `caddy` or `container`
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
nb proxy caddy status
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Related commands
|
|
33
|
+
|
|
34
|
+
- [`nb proxy caddy info`](./info.md)
|
|
35
|
+
- [`nb proxy caddy start`](./start.md)
|
|
36
|
+
- [`nb proxy caddy stop`](./stop.md)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy caddy stop"
|
|
3
|
+
description: "nb proxy caddy stop command reference: stop the Caddy proxy with the current driver."
|
|
4
|
+
keywords: "nb proxy caddy stop,NocoBase CLI,caddy,stop"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy caddy stop
|
|
8
|
+
|
|
9
|
+
Stop the Caddy proxy with the current driver.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb proxy caddy stop
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
nb proxy caddy stop
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Notes
|
|
24
|
+
|
|
25
|
+
- With the `local` driver, this stops the local Caddy process
|
|
26
|
+
- With the `docker` driver, this stops the proxy container
|
|
27
|
+
- If the proxy is already stopped, the command reports that it is already stopped
|
|
28
|
+
|
|
29
|
+
## Related commands
|
|
30
|
+
|
|
31
|
+
- [`nb proxy caddy start`](./start.md)
|
|
32
|
+
- [`nb proxy caddy status`](./status.md)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy caddy use"
|
|
3
|
+
description: "nb proxy caddy use command reference: switch the current driver for the Caddy provider."
|
|
4
|
+
keywords: "nb proxy caddy use,NocoBase CLI,caddy,driver"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy caddy use
|
|
8
|
+
|
|
9
|
+
Switch the current driver for the Caddy provider.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb proxy caddy use <driver>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `<driver>` | string | Supports `local` or `docker` |
|
|
22
|
+
|
|
23
|
+
## Examples
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
nb proxy caddy use local
|
|
27
|
+
nb proxy caddy use docker
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Notes
|
|
31
|
+
|
|
32
|
+
- This command saves the result to `proxy.caddy-driver`
|
|
33
|
+
- Later commands such as `start`, `reload`, `stop`, `status`, and `info` all use the current driver
|
|
34
|
+
|
|
35
|
+
## Related commands
|
|
36
|
+
|
|
37
|
+
- [`nb proxy caddy current`](./current.md)
|
|
38
|
+
- [`nb proxy caddy start`](./start.md)
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy"
|
|
3
|
+
description: "nb proxy command-group reference: choose the Nginx or Caddy provider and manage reverse-proxy entrypoints for CLI-managed envs."
|
|
4
|
+
keywords: "nb proxy,NocoBase CLI,nginx,caddy,reverse proxy,proxy configuration"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy
|
|
8
|
+
|
|
9
|
+
In NocoBase CLI, `nb proxy` is the unified entry point for reverse-proxy management.
|
|
10
|
+
|
|
11
|
+
It separates env management from entry-layer management:
|
|
12
|
+
|
|
13
|
+
- `nb env` saves and maintains application envs
|
|
14
|
+
- `nb proxy` generates and manages Nginx or Caddy entrypoints for those CLI-managed envs
|
|
15
|
+
|
|
16
|
+
As long as your app has already been saved as a CLI-managed env and that env is `local` or `docker`, choosing a provider subcommand is usually enough.
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
nb proxy <provider> <command>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Command tree
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
nb proxy nginx use <local|docker>
|
|
28
|
+
nb proxy nginx current
|
|
29
|
+
nb proxy nginx generate --env <name> [--host <domain>] [--port <port>]
|
|
30
|
+
nb proxy nginx start
|
|
31
|
+
nb proxy nginx restart
|
|
32
|
+
nb proxy nginx reload
|
|
33
|
+
nb proxy nginx stop
|
|
34
|
+
nb proxy nginx status
|
|
35
|
+
nb proxy nginx info
|
|
36
|
+
|
|
37
|
+
nb proxy caddy use <local|docker>
|
|
38
|
+
nb proxy caddy current
|
|
39
|
+
nb proxy caddy generate --env <name> [--host <domain>] [--port <port>]
|
|
40
|
+
nb proxy caddy start
|
|
41
|
+
nb proxy caddy restart
|
|
42
|
+
nb proxy caddy reload
|
|
43
|
+
nb proxy caddy stop
|
|
44
|
+
nb proxy caddy status
|
|
45
|
+
nb proxy caddy info
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Providers
|
|
49
|
+
|
|
50
|
+
| I want to... | Go here |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| Keep using Nginx for sites, certificates, caching, or access control | [`nb proxy nginx`](./nginx/index.md) |
|
|
53
|
+
| Get HTTPS running quickly while maintaining fewer TLS details yourself | [`nb proxy caddy`](./caddy/index.md) |
|
|
54
|
+
| Adjust env settings that may affect proxy output, such as `app-port` or `app-public-path` | [`nb env update`](../env/update.md) |
|
|
55
|
+
|
|
56
|
+
## Notes
|
|
57
|
+
|
|
58
|
+
- `nb proxy` itself does not have standalone flags
|
|
59
|
+
- Use `nb proxy nginx` or `nb proxy caddy` to generate and manage entrypoints
|
|
60
|
+
- Both providers only work for managed envs whose runtime is reachable from the current machine, which means `local` or `docker`
|
|
61
|
+
- Both providers support two drivers: `local` and `docker`
|
|
62
|
+
- `use` saves the default driver, and `current` prints the current driver directly
|
|
63
|
+
- `generate` writes or refreshes entry config files and does not automatically start the proxy process
|
|
64
|
+
- `start`, `restart`, `reload`, `stop`, `status`, and `info` all operate on the current driver's runtime
|
|
65
|
+
- If you change settings such as `app-port` or `app-public-path` with `nb env update`, you will usually need to rerun the matching `generate` command afterward
|
|
66
|
+
- This command group does not currently work for envs that only have a remote API connection or for SSH envs
|
|
67
|
+
|
|
68
|
+
## Typical workflow
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# 1. Choose a provider and runtime driver
|
|
72
|
+
nb proxy nginx use docker
|
|
73
|
+
|
|
74
|
+
# 2. Generate the entry config for one CLI-managed env
|
|
75
|
+
nb proxy nginx generate --env app1 --host app1.example.com
|
|
76
|
+
|
|
77
|
+
# 3. Start the proxy
|
|
78
|
+
nb proxy nginx start
|
|
79
|
+
|
|
80
|
+
# 4. Inspect status and path information
|
|
81
|
+
nb proxy nginx status
|
|
82
|
+
nb proxy nginx info
|
|
83
|
+
|
|
84
|
+
# 5. Reload after config changes
|
|
85
|
+
nb proxy nginx reload
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
If you choose Caddy, replace `nginx` in the commands above with `caddy`.
|
|
89
|
+
|
|
90
|
+
## Common command differences
|
|
91
|
+
|
|
92
|
+
| Command | Purpose |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| `use` | Switch the default driver for the current provider |
|
|
95
|
+
| `current` | Print the current provider driver, such as `local` or `docker` |
|
|
96
|
+
| `generate` | Generate or refresh proxy entry files for one env |
|
|
97
|
+
| `start` | Start the proxy with the current driver |
|
|
98
|
+
| `reload` | Reload configuration without stopping the service |
|
|
99
|
+
| `restart` | Stop and then start again |
|
|
100
|
+
| `stop` | Stop the proxy |
|
|
101
|
+
| `status` | Show runtime status |
|
|
102
|
+
| `info` | Show the driver, config-file path, runtime root, upstream host, and related runtime details |
|
|
103
|
+
|
|
104
|
+
## Examples
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Generate and start Nginx for one env
|
|
108
|
+
nb proxy nginx use docker
|
|
109
|
+
nb proxy nginx generate --env demo --host demo.local.nocobase.com
|
|
110
|
+
nb proxy nginx start
|
|
111
|
+
|
|
112
|
+
# Generate and start Caddy for one env
|
|
113
|
+
nb proxy caddy use local
|
|
114
|
+
nb proxy caddy generate --env demo --host demo.local.nocobase.com
|
|
115
|
+
nb proxy caddy start
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Related commands
|
|
119
|
+
|
|
120
|
+
- [`nb proxy nginx`](./nginx/index.md)
|
|
121
|
+
- [`nb proxy caddy`](./caddy/index.md)
|
|
122
|
+
- [`nb env update`](../env/update.md)
|
|
123
|
+
- [`nb env info`](../env/info.md)
|
|
124
|
+
- [`nb config`](../config/index.md)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy nginx current"
|
|
3
|
+
description: "nb proxy nginx current command reference: print the current Nginx provider driver."
|
|
4
|
+
keywords: "nb proxy nginx current,NocoBase CLI,nginx,driver"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy nginx current
|
|
8
|
+
|
|
9
|
+
Print the current Nginx provider driver.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb proxy nginx current
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Output
|
|
18
|
+
|
|
19
|
+
The command prints one value directly:
|
|
20
|
+
|
|
21
|
+
- `local`
|
|
22
|
+
- `docker`
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
nb proxy nginx current
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Related commands
|
|
31
|
+
|
|
32
|
+
- [`nb proxy nginx use`](./use.md)
|
|
33
|
+
- [`nb proxy nginx info`](./info.md)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy nginx generate"
|
|
3
|
+
description: "nb proxy nginx generate command reference: generate or refresh the Nginx config for one CLI-managed env."
|
|
4
|
+
keywords: "nb proxy nginx generate,NocoBase CLI,nginx,reverse proxy,proxy configuration"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy nginx generate
|
|
8
|
+
|
|
9
|
+
Generate or refresh the Nginx entry config for one CLI-managed env.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb proxy nginx generate --env <name> [--host <domain>] [--port <port>]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `--env`, `-e` | string | CLI-managed env name to generate the config for |
|
|
22
|
+
| `--host` | string | Host written into the entry config, such as `app1.example.com` |
|
|
23
|
+
| `--port` | string | Listen port written into the entry config, such as `8080` |
|
|
24
|
+
|
|
25
|
+
## Generated files
|
|
26
|
+
|
|
27
|
+
Using env `test2` as an example, the command typically maintains these files and directories:
|
|
28
|
+
|
|
29
|
+
- `NB_CLI_ROOT/.nocobase/proxy/nginx/nocobase.conf`
|
|
30
|
+
- `NB_CLI_ROOT/.nocobase/proxy/nginx/snippets/`
|
|
31
|
+
- `NB_CLI_ROOT/.nocobase/proxy/nginx/test2/app.conf`
|
|
32
|
+
- `NB_CLI_ROOT/.nocobase/proxy/nginx/test2/public/index-v1.html`
|
|
33
|
+
- `NB_CLI_ROOT/.nocobase/proxy/nginx/test2/public/index-v2.html`
|
|
34
|
+
|
|
35
|
+
The generated Nginx entry covers these main capability areas:
|
|
36
|
+
|
|
37
|
+
- `uploads`
|
|
38
|
+
- `dist`
|
|
39
|
+
- `well-known`
|
|
40
|
+
- `api`
|
|
41
|
+
- `ws`
|
|
42
|
+
- `spa`
|
|
43
|
+
|
|
44
|
+
## Examples
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
nb proxy nginx generate --env demo --host demo.local.nocobase.com
|
|
48
|
+
nb proxy nginx generate --env demo --host demo.local.nocobase.com --port 8080
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Notes
|
|
52
|
+
|
|
53
|
+
- `generate` only writes or refreshes config and does not automatically start Nginx
|
|
54
|
+
- `app.conf` is the editable entry file, but its managed block must stay intact
|
|
55
|
+
- If you change settings such as `app-port` or `app-public-path` with `nb env update`, you will usually need to rerun this command
|
|
56
|
+
- Only CLI-managed `local` or `docker` envs can use this command
|
|
57
|
+
|
|
58
|
+
## Related commands
|
|
59
|
+
|
|
60
|
+
- [`nb proxy nginx start`](./start.md)
|
|
61
|
+
- [`nb proxy nginx reload`](./reload.md)
|
|
62
|
+
- [`nb env update`](../../env/update.md)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb proxy nginx"
|
|
3
|
+
description: "nb proxy nginx command-group reference: manage the Nginx provider driver, config generation, and runtime control."
|
|
4
|
+
keywords: "nb proxy nginx,NocoBase CLI,nginx,reverse proxy,proxy configuration"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb proxy nginx
|
|
8
|
+
|
|
9
|
+
`nb proxy nginx` is the command-group entry for the Nginx provider.
|
|
10
|
+
|
|
11
|
+
If you already use Nginx to manage sites, certificates, caching, or access control, this is usually the place to start. It handles two things:
|
|
12
|
+
|
|
13
|
+
- choosing how Nginx runs, which means `local` or `docker`
|
|
14
|
+
- generating, starting, reloading, and inspecting the Nginx entrypoint for CLI-managed envs
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
nb proxy nginx <command>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Subcommands
|
|
23
|
+
|
|
24
|
+
| Command | Description |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| [`nb proxy nginx use`](./use.md) | Switch the Nginx driver |
|
|
27
|
+
| [`nb proxy nginx current`](./current.md) | Print the current driver |
|
|
28
|
+
| [`nb proxy nginx generate`](./generate.md) | Generate or refresh the Nginx config for one env |
|
|
29
|
+
| [`nb proxy nginx start`](./start.md) | Start the Nginx proxy |
|
|
30
|
+
| [`nb proxy nginx restart`](./restart.md) | Restart the Nginx proxy |
|
|
31
|
+
| [`nb proxy nginx reload`](./reload.md) | Reload the Nginx config |
|
|
32
|
+
| [`nb proxy nginx stop`](./stop.md) | Stop the Nginx proxy |
|
|
33
|
+
| [`nb proxy nginx status`](./status.md) | Show Nginx runtime status |
|
|
34
|
+
| [`nb proxy nginx info`](./info.md) | Show driver, config paths, and runtime info |
|
|
35
|
+
|
|
36
|
+
## Notes
|
|
37
|
+
|
|
38
|
+
- The current driver is stored in `proxy.nginx-driver`
|
|
39
|
+
- The default driver is `local`
|
|
40
|
+
- The local driver uses the executable pointed to by `bin.nginx`, whose default value is `nginx`
|
|
41
|
+
- The Docker driver uses `nginx:latest`
|
|
42
|
+
- The default Docker container name is `<docker.container-prefix>-nginx-proxy`
|
|
43
|
+
- The Docker driver mounts host `NB_CLI_ROOT` into the container at `/apps`
|
|
44
|
+
|
|
45
|
+
## Typical workflow
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
nb proxy nginx use docker
|
|
49
|
+
nb proxy nginx generate --env app1 --host app1.example.com
|
|
50
|
+
nb proxy nginx start
|
|
51
|
+
nb proxy nginx status
|
|
52
|
+
nb proxy nginx info
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Related commands
|
|
56
|
+
|
|
57
|
+
- [`nb proxy`](../index.md)
|
|
58
|
+
- [`nb proxy caddy`](../caddy/index.md)
|
|
59
|
+
- [`nb env update`](../../env/update.md)
|
|
60
|
+
- [`nb config`](../../config/index.md)
|