@nocobase/plugin-ai 2.2.0-beta.8 → 2.2.0-beta.9
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/app/env.md +28 -1
- package/dist/ai/docs/nocobase/api/cli/config/delete.md +8 -6
- package/dist/ai/docs/nocobase/api/cli/config/get.md +8 -6
- package/dist/ai/docs/nocobase/api/cli/config/index.md +37 -26
- package/dist/ai/docs/nocobase/api/cli/config/set.md +14 -8
- package/dist/ai/docs/nocobase/file-manager/field-attachment.md +6 -0
- package/dist/ai/docs/nocobase/file-manager/file-preview/index.md +3 -12
- package/dist/ai/docs/nocobase/file-manager/storage/aliyun-oss.md +9 -0
- package/dist/ai/docs/nocobase/file-manager/storage/amazon-s3.md +9 -0
- package/dist/ai/docs/nocobase/file-manager/storage/index.md +23 -0
- package/dist/ai/docs/nocobase/file-manager/storage/local.md +9 -0
- package/dist/ai/docs/nocobase/file-manager/storage/migrate-to-s3-pro.md +269 -0
- package/dist/ai/docs/nocobase/file-manager/storage/tencent-cos.md +9 -0
- package/dist/ai/docs/nocobase/get-started/installation/docker-caddy.mdx +175 -0
- package/dist/ai/docs/nocobase/get-started/installation/docker-nginx.mdx +176 -0
- package/dist/ai/docs/nocobase/get-started/installation/docker.mdx +94 -1
- package/dist/ai/docs/nocobase/get-started/installation/env.md +14 -4
- package/dist/ai/docs/nocobase/ops-management/version-control/index.md +1 -0
- package/dist/client/{428.e9f38da3b0d8b498.js → 428.5eb4f53ddbb6a3b8.js} +1 -1
- package/dist/client/559.9f97ebcdb0bd6231.js +10 -0
- package/dist/client/index.js +3 -3
- package/dist/client/llm-providers/mistral/ModelSettings.d.ts +10 -0
- package/dist/client/llm-providers/mistral/index.d.ts +10 -0
- package/dist/client/llm-services/utils.d.ts +5 -0
- package/dist/client-v2/index.d.ts +0 -1
- package/dist/client-v2/index.js +1 -1
- package/dist/externalVersion.js +16 -16
- package/dist/locale/en-US.json +1 -0
- package/dist/locale/zh-CN.json +1 -0
- package/dist/node_modules/@langchain/mistralai/LICENSE +21 -0
- package/dist/node_modules/@langchain/mistralai/dist/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/node_modules/@langchain/mistralai/dist/chat_models.cjs +859 -0
- package/dist/node_modules/@langchain/mistralai/dist/chat_models.d.cts +541 -0
- package/dist/node_modules/@langchain/mistralai/dist/chat_models.d.ts +541 -0
- package/dist/node_modules/@langchain/mistralai/dist/chat_models.js +857 -0
- package/dist/node_modules/@langchain/mistralai/dist/embeddings.cjs +140 -0
- package/dist/node_modules/@langchain/mistralai/dist/embeddings.d.cts +116 -0
- package/dist/node_modules/@langchain/mistralai/dist/embeddings.d.ts +116 -0
- package/dist/node_modules/@langchain/mistralai/dist/embeddings.js +139 -0
- package/dist/node_modules/@langchain/mistralai/dist/index.cjs +21 -0
- package/dist/node_modules/@langchain/mistralai/dist/index.d.cts +4 -0
- package/dist/node_modules/@langchain/mistralai/dist/index.d.ts +4 -0
- package/dist/node_modules/@langchain/mistralai/dist/index.js +5 -0
- package/dist/node_modules/@langchain/mistralai/dist/llms.cjs +275 -0
- package/dist/node_modules/@langchain/mistralai/dist/llms.d.cts +147 -0
- package/dist/node_modules/@langchain/mistralai/dist/llms.d.ts +147 -0
- package/dist/node_modules/@langchain/mistralai/dist/llms.js +274 -0
- package/dist/node_modules/@langchain/mistralai/dist/utils.cjs +61 -0
- package/dist/node_modules/@langchain/mistralai/dist/utils.js +59 -0
- package/dist/node_modules/@langchain/mistralai/package.json +1 -0
- package/dist/node_modules/@langchain/xai/dist/index.cjs +2 -2
- 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/ai-employees/ai-employee.js +7 -5
- package/dist/server/ai-employees/checkpoints/cleaner.d.ts +2 -0
- package/dist/server/ai-employees/checkpoints/cleaner.js +11 -1
- package/dist/server/ai-employees/middleware/conversation.d.ts +2 -0
- package/dist/server/ai-employees/middleware/conversation.js +2 -1
- package/dist/server/ai-employees/utils.d.ts +3 -1
- package/dist/server/ai-employees/utils.js +2 -0
- package/dist/server/llm-providers/mistral.d.ts +62 -0
- package/dist/server/llm-providers/mistral.js +265 -0
- package/dist/server/llm-providers/provider.d.ts +6 -2
- package/dist/server/llm-providers/provider.js +27 -14
- package/dist/server/plugin.js +2 -0
- package/dist/server/workflow/nodes/employee/index.js +92 -46
- package/dist/server/workflow/nodes/employee/tools.js +8 -1
- package/package.json +3 -2
- package/dist/client/559.a0f2f1cc2be3c039.js +0 -10
- package/dist/client-v2/ai-employees/flow/models/AIEmployeeButtonModel.d.ts +0 -32
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
A storage engine based on Tencent Cloud COS. You need to prepare the relevant account and permissions before use.
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
:::warning Note
|
|
7
|
+
|
|
8
|
+
This engine does not support private access. After a file is uploaded, NocoBase generates a directly accessible URL, and anyone who has that URL can access the file.
|
|
9
|
+
|
|
10
|
+
Even if the COS bucket itself is private, the built-in Tencent COS engine does not generate temporary signed URLs for file access. If you need private access, use [S3 Pro](./s3-pro). If historical files already exist, see [Migrate to S3 Pro](./migrate-to-s3-pro.md).
|
|
11
|
+
|
|
12
|
+
:::
|
|
13
|
+
|
|
5
14
|
## Configuration Parameters
|
|
6
15
|
|
|
7
16
|
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Docker Installation (External Caddy)"
|
|
3
|
+
description: "Install NocoBase with Docker and use an external Caddy container as the entry point."
|
|
4
|
+
keywords: "Docker,NocoBase,Caddy,installation,reverse proxy"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Docker Installation (External Caddy)
|
|
8
|
+
|
|
9
|
+
In this setup, the NocoBase app container and the Caddy container run separately. You can start with [Docker Installation (Built-in Nginx)](./docker.mdx) and then switch the entry service to an external Caddy container.
|
|
10
|
+
|
|
11
|
+
## When to use this setup
|
|
12
|
+
|
|
13
|
+
- You want to deploy NocoBase and the web server separately
|
|
14
|
+
- You want to simplify reverse proxy and HTTPS configuration with Caddy
|
|
15
|
+
- You want to expose only the proxy container to the public network
|
|
16
|
+
|
|
17
|
+
## docker-compose.yml example
|
|
18
|
+
|
|
19
|
+
If you need the `full` image, replace `latest-no-nginx` with `latest-full-no-nginx`.
|
|
20
|
+
|
|
21
|
+
The `13000:80` mapping is only for convenient local testing, so it does not occupy the standard host ports directly. In production, you usually do not keep using `13000:80`; instead, let the external Caddy container map directly to the host `80` and `443` ports.
|
|
22
|
+
```yml
|
|
23
|
+
networks:
|
|
24
|
+
nocobase:
|
|
25
|
+
driver: bridge
|
|
26
|
+
|
|
27
|
+
services:
|
|
28
|
+
app:
|
|
29
|
+
image: nocobase/nocobase:latest-no-nginx
|
|
30
|
+
restart: always
|
|
31
|
+
depends_on:
|
|
32
|
+
- postgres
|
|
33
|
+
networks:
|
|
34
|
+
- nocobase
|
|
35
|
+
environment:
|
|
36
|
+
- APP_KEY=your-secret-key
|
|
37
|
+
- DB_DIALECT=postgres
|
|
38
|
+
- DB_HOST=postgres
|
|
39
|
+
- DB_PORT=5432
|
|
40
|
+
- DB_DATABASE=nocobase
|
|
41
|
+
- DB_USER=nocobase
|
|
42
|
+
- DB_PASSWORD=nocobase
|
|
43
|
+
- TZ=Etc/UTC
|
|
44
|
+
- NOCOBASE_EXTRACT_CLIENT_ASSETS=true
|
|
45
|
+
- NOCOBASE_PROXY_PROVIDER=caddy
|
|
46
|
+
- NOCOBASE_PROXY_STORAGE_PATH=/app/nocobase/storage
|
|
47
|
+
- NOCOBASE_PROXY_UPSTREAM_HOST=app
|
|
48
|
+
volumes:
|
|
49
|
+
- ./storage:/app/nocobase/storage
|
|
50
|
+
|
|
51
|
+
caddy:
|
|
52
|
+
image: caddy:2
|
|
53
|
+
restart: always
|
|
54
|
+
depends_on:
|
|
55
|
+
- app
|
|
56
|
+
networks:
|
|
57
|
+
- nocobase
|
|
58
|
+
volumes:
|
|
59
|
+
- ./storage:/app/nocobase/storage
|
|
60
|
+
command: >
|
|
61
|
+
/bin/sh -c '
|
|
62
|
+
while [ ! -f /app/nocobase/storage/.nocobase/proxy/caddy/nocobase.caddy ]; do
|
|
63
|
+
echo "waiting for nocobase.caddy..."
|
|
64
|
+
sleep 1
|
|
65
|
+
done
|
|
66
|
+
ln -sf /app/nocobase/storage/.nocobase/proxy/caddy/nocobase.caddy /etc/caddy/Caddyfile
|
|
67
|
+
caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
|
|
68
|
+
'
|
|
69
|
+
ports:
|
|
70
|
+
# This is only a local testing example.
|
|
71
|
+
- "13000:80"
|
|
72
|
+
# In production, usually change it to:
|
|
73
|
+
# - "80:80"
|
|
74
|
+
# - "443:443"
|
|
75
|
+
|
|
76
|
+
postgres:
|
|
77
|
+
image: postgres:16
|
|
78
|
+
restart: always
|
|
79
|
+
command: postgres -c wal_level=logical
|
|
80
|
+
environment:
|
|
81
|
+
POSTGRES_USER: nocobase
|
|
82
|
+
POSTGRES_DB: nocobase
|
|
83
|
+
POSTGRES_PASSWORD: nocobase
|
|
84
|
+
volumes:
|
|
85
|
+
- ./storage/db/postgres:/var/lib/postgresql/data
|
|
86
|
+
networks:
|
|
87
|
+
- nocobase
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Key points
|
|
91
|
+
|
|
92
|
+
- `NOCOBASE_EXTRACT_CLIENT_ASSETS=true` extracts client assets and generates proxy config
|
|
93
|
+
- `NOCOBASE_PROXY_PROVIDER=caddy` tells the app to generate Caddy config
|
|
94
|
+
- `NOCOBASE_PROXY_UPSTREAM_HOST=app` lets the Caddy container reach the `app` service through the Compose network
|
|
95
|
+
- `./storage` must be mounted into both the `app` and `caddy` containers so they can share proxy config, static assets, and uploaded files
|
|
96
|
+
- The `caddy` container should wait until `nocobase.caddy` is generated, then link it to `/etc/caddy/Caddyfile` with `ln -sf`
|
|
97
|
+
- Expose only the Caddy container port to the host. For testing, you can start with `13000:80`; in production, you usually expose the host `80` and `443` ports directly, while the `app` service does not need to expose its port to the host
|
|
98
|
+
|
|
99
|
+
## If you use a local host Caddy
|
|
100
|
+
|
|
101
|
+
If your Caddy is installed directly on the host instead of running in a Docker container, it is better to use a separate `docker-compose.yml`. In this setup, the `app` service must expose a host port directly, and the proxy-related environment variables should use host-side values.
|
|
102
|
+
|
|
103
|
+
You can use a `docker-compose.yml` like this:
|
|
104
|
+
|
|
105
|
+
```yml
|
|
106
|
+
networks:
|
|
107
|
+
nocobase:
|
|
108
|
+
driver: bridge
|
|
109
|
+
|
|
110
|
+
services:
|
|
111
|
+
app:
|
|
112
|
+
image: nocobase/nocobase:latest-no-nginx
|
|
113
|
+
restart: always
|
|
114
|
+
depends_on:
|
|
115
|
+
- postgres
|
|
116
|
+
networks:
|
|
117
|
+
- nocobase
|
|
118
|
+
environment:
|
|
119
|
+
- APP_KEY=your-secret-key
|
|
120
|
+
- DB_DIALECT=postgres
|
|
121
|
+
- DB_HOST=postgres
|
|
122
|
+
- DB_PORT=5432
|
|
123
|
+
- DB_DATABASE=nocobase
|
|
124
|
+
- DB_USER=nocobase
|
|
125
|
+
- DB_PASSWORD=nocobase
|
|
126
|
+
- TZ=Etc/UTC
|
|
127
|
+
- NOCOBASE_EXTRACT_CLIENT_ASSETS=true
|
|
128
|
+
- NOCOBASE_PROXY_PROVIDER=caddy
|
|
129
|
+
- NOCOBASE_PROXY_STORAGE_PATH=/path/to/your-project/storage
|
|
130
|
+
- NOCOBASE_PROXY_UPSTREAM_HOST=127.0.0.1
|
|
131
|
+
- NOCOBASE_PROXY_UPSTREAM_PORT=13000
|
|
132
|
+
volumes:
|
|
133
|
+
- ./storage:/app/nocobase/storage
|
|
134
|
+
ports:
|
|
135
|
+
- "13000:13000"
|
|
136
|
+
|
|
137
|
+
postgres:
|
|
138
|
+
image: postgres:16
|
|
139
|
+
restart: always
|
|
140
|
+
command: postgres -c wal_level=logical
|
|
141
|
+
environment:
|
|
142
|
+
POSTGRES_USER: nocobase
|
|
143
|
+
POSTGRES_DB: nocobase
|
|
144
|
+
POSTGRES_PASSWORD: nocobase
|
|
145
|
+
volumes:
|
|
146
|
+
- ./storage/db/postgres:/var/lib/postgresql/data
|
|
147
|
+
networks:
|
|
148
|
+
- nocobase
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
In this variant:
|
|
152
|
+
|
|
153
|
+
- `NOCOBASE_PROXY_STORAGE_PATH` should be the absolute host path of your `storage` directory
|
|
154
|
+
- `NOCOBASE_PROXY_UPSTREAM_HOST` should be `127.0.0.1`
|
|
155
|
+
- The `app` service must keep `ports`, so the local Caddy can reach the app through `127.0.0.1:13000`
|
|
156
|
+
|
|
157
|
+
After the `app` container starts, wait for the config file to be generated, then link it into the local Caddy config path:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
while [ ! -f ./storage/.nocobase/proxy/caddy/nocobase.caddy ]; do
|
|
161
|
+
echo "waiting for nocobase.caddy..."
|
|
162
|
+
sleep 1
|
|
163
|
+
done
|
|
164
|
+
|
|
165
|
+
sudo ln -sf "$(pwd)/storage/.nocobase/proxy/caddy/nocobase.caddy" /etc/caddy/Caddyfile
|
|
166
|
+
sudo caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile
|
|
167
|
+
sudo systemctl reload caddy
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
If your host Caddy does not use `/etc/caddy/Caddyfile`, replace the link target with your own config path. Usually it is safer to keep `nocobase.caddy` as the main entry file instead of copying its content manually.
|
|
171
|
+
|
|
172
|
+
## Related links
|
|
173
|
+
|
|
174
|
+
- [Docker Installation (Built-in Nginx)](./docker.mdx) — Start with the single-container setup
|
|
175
|
+
- [Caddy Static Resource Proxy](../deployment/static-resource-proxy/caddy.md) — Learn more about the generated Caddy config
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Docker Installation (External Nginx)"
|
|
3
|
+
description: "Install NocoBase with Docker and use an external Nginx container as the entry point."
|
|
4
|
+
keywords: "Docker,NocoBase,Nginx,installation,reverse proxy"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Docker Installation (External Nginx)
|
|
8
|
+
|
|
9
|
+
In this setup, the NocoBase app container and the Nginx container run separately. You can start with [Docker Installation (Built-in Nginx)](./docker.mdx) and then switch the entry service to an external Nginx container.
|
|
10
|
+
|
|
11
|
+
## When to use this setup
|
|
12
|
+
|
|
13
|
+
- You want to deploy NocoBase and the web server separately
|
|
14
|
+
- You want to manage the Nginx config and exposed ports yourself
|
|
15
|
+
- You want to expose only the proxy container to the public network
|
|
16
|
+
|
|
17
|
+
## docker-compose.yml example
|
|
18
|
+
|
|
19
|
+
If you need the `full` image, replace `latest-no-nginx` with `latest-full-no-nginx`.
|
|
20
|
+
|
|
21
|
+
The `13000:80` mapping is only for convenient local testing, so it does not occupy the standard host ports directly. In production, you usually do not keep using `13000:80`; instead, let the external Nginx container map directly to the host `80` and `443` ports.
|
|
22
|
+
```yml
|
|
23
|
+
networks:
|
|
24
|
+
nocobase:
|
|
25
|
+
driver: bridge
|
|
26
|
+
|
|
27
|
+
services:
|
|
28
|
+
app:
|
|
29
|
+
image: nocobase/nocobase:latest-no-nginx
|
|
30
|
+
restart: always
|
|
31
|
+
depends_on:
|
|
32
|
+
- postgres
|
|
33
|
+
networks:
|
|
34
|
+
- nocobase
|
|
35
|
+
environment:
|
|
36
|
+
- APP_KEY=your-secret-key
|
|
37
|
+
- DB_DIALECT=postgres
|
|
38
|
+
- DB_HOST=postgres
|
|
39
|
+
- DB_PORT=5432
|
|
40
|
+
- DB_DATABASE=nocobase
|
|
41
|
+
- DB_USER=nocobase
|
|
42
|
+
- DB_PASSWORD=nocobase
|
|
43
|
+
- TZ=Etc/UTC
|
|
44
|
+
- NOCOBASE_EXTRACT_CLIENT_ASSETS=true
|
|
45
|
+
- NOCOBASE_PROXY_PROVIDER=nginx
|
|
46
|
+
- NOCOBASE_PROXY_STORAGE_PATH=/app/nocobase/storage
|
|
47
|
+
- NOCOBASE_PROXY_UPSTREAM_HOST=app
|
|
48
|
+
volumes:
|
|
49
|
+
- ./storage:/app/nocobase/storage
|
|
50
|
+
|
|
51
|
+
nginx:
|
|
52
|
+
image: nginx:latest
|
|
53
|
+
restart: always
|
|
54
|
+
depends_on:
|
|
55
|
+
- app
|
|
56
|
+
networks:
|
|
57
|
+
- nocobase
|
|
58
|
+
volumes:
|
|
59
|
+
- ./storage:/app/nocobase/storage
|
|
60
|
+
command: >
|
|
61
|
+
/bin/sh -c '
|
|
62
|
+
while [ ! -f /app/nocobase/storage/.nocobase/proxy/nginx/nocobase.conf ]; do
|
|
63
|
+
echo "waiting for nocobase.conf..."
|
|
64
|
+
sleep 1
|
|
65
|
+
done
|
|
66
|
+
rm -f /etc/nginx/conf.d/default.conf
|
|
67
|
+
ln -sf /app/nocobase/storage/.nocobase/proxy/nginx/nocobase.conf /etc/nginx/conf.d/default.conf
|
|
68
|
+
nginx -g "daemon off;"
|
|
69
|
+
'
|
|
70
|
+
ports:
|
|
71
|
+
# This is only a local testing example.
|
|
72
|
+
- "13000:80"
|
|
73
|
+
# In production, usually change it to:
|
|
74
|
+
# - "80:80"
|
|
75
|
+
# - "443:443"
|
|
76
|
+
|
|
77
|
+
postgres:
|
|
78
|
+
image: postgres:16
|
|
79
|
+
restart: always
|
|
80
|
+
command: postgres -c wal_level=logical
|
|
81
|
+
environment:
|
|
82
|
+
POSTGRES_USER: nocobase
|
|
83
|
+
POSTGRES_DB: nocobase
|
|
84
|
+
POSTGRES_PASSWORD: nocobase
|
|
85
|
+
volumes:
|
|
86
|
+
- ./storage/db/postgres:/var/lib/postgresql/data
|
|
87
|
+
networks:
|
|
88
|
+
- nocobase
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Key points
|
|
92
|
+
|
|
93
|
+
- `NOCOBASE_EXTRACT_CLIENT_ASSETS=true` extracts client assets and generates proxy config
|
|
94
|
+
- `NOCOBASE_PROXY_PROVIDER=nginx` tells the app to generate Nginx config
|
|
95
|
+
- `NOCOBASE_PROXY_UPSTREAM_HOST=app` lets the Nginx container reach the `app` service through the Compose network
|
|
96
|
+
- `./storage` must be mounted into both the `app` and `nginx` containers so they can share proxy config, static assets, and uploaded files
|
|
97
|
+
- The `nginx` container should wait until `nocobase.conf` is generated, then link it to `/etc/nginx/conf.d/default.conf` with `ln -sf`
|
|
98
|
+
- If you use an external Nginx container, let the `nginx` container handle the host port mapping. For testing, you can start with `13000:80`; in production, you usually expose the host `80` and `443` ports directly, while the `app` service does not need to expose its port to the host
|
|
99
|
+
|
|
100
|
+
## If you use a local host Nginx
|
|
101
|
+
|
|
102
|
+
If your Nginx is installed directly on the host instead of running in a Docker container, it is better to use a separate `docker-compose.yml`. In this setup, the `app` service must expose a host port directly, and the proxy-related environment variables should use host-side values.
|
|
103
|
+
|
|
104
|
+
You can use a `docker-compose.yml` like this:
|
|
105
|
+
|
|
106
|
+
```yml
|
|
107
|
+
networks:
|
|
108
|
+
nocobase:
|
|
109
|
+
driver: bridge
|
|
110
|
+
|
|
111
|
+
services:
|
|
112
|
+
app:
|
|
113
|
+
image: nocobase/nocobase:latest-no-nginx
|
|
114
|
+
restart: always
|
|
115
|
+
depends_on:
|
|
116
|
+
- postgres
|
|
117
|
+
networks:
|
|
118
|
+
- nocobase
|
|
119
|
+
environment:
|
|
120
|
+
- APP_KEY=your-secret-key
|
|
121
|
+
- DB_DIALECT=postgres
|
|
122
|
+
- DB_HOST=postgres
|
|
123
|
+
- DB_PORT=5432
|
|
124
|
+
- DB_DATABASE=nocobase
|
|
125
|
+
- DB_USER=nocobase
|
|
126
|
+
- DB_PASSWORD=nocobase
|
|
127
|
+
- TZ=Etc/UTC
|
|
128
|
+
- NOCOBASE_EXTRACT_CLIENT_ASSETS=true
|
|
129
|
+
- NOCOBASE_PROXY_PROVIDER=nginx
|
|
130
|
+
- NOCOBASE_PROXY_STORAGE_PATH=/path/to/your-project/storage
|
|
131
|
+
- NOCOBASE_PROXY_UPSTREAM_HOST=127.0.0.1
|
|
132
|
+
- NOCOBASE_PROXY_UPSTREAM_PORT=13000
|
|
133
|
+
volumes:
|
|
134
|
+
- ./storage:/app/nocobase/storage
|
|
135
|
+
ports:
|
|
136
|
+
- "13000:13000"
|
|
137
|
+
|
|
138
|
+
postgres:
|
|
139
|
+
image: postgres:16
|
|
140
|
+
restart: always
|
|
141
|
+
command: postgres -c wal_level=logical
|
|
142
|
+
environment:
|
|
143
|
+
POSTGRES_USER: nocobase
|
|
144
|
+
POSTGRES_DB: nocobase
|
|
145
|
+
POSTGRES_PASSWORD: nocobase
|
|
146
|
+
volumes:
|
|
147
|
+
- ./storage/db/postgres:/var/lib/postgresql/data
|
|
148
|
+
networks:
|
|
149
|
+
- nocobase
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
In this variant:
|
|
153
|
+
|
|
154
|
+
- `NOCOBASE_PROXY_STORAGE_PATH` should be the absolute host path of your `storage` directory
|
|
155
|
+
- `NOCOBASE_PROXY_UPSTREAM_HOST` should be `127.0.0.1`
|
|
156
|
+
- The `app` service must keep `ports`, so the local Nginx can reach the app through `127.0.0.1:13000`
|
|
157
|
+
|
|
158
|
+
After the `app` container starts, wait for the config file to be generated, then link it into the local Nginx config directory:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
while [ ! -f ./storage/.nocobase/proxy/nginx/nocobase.conf ]; do
|
|
162
|
+
echo "waiting for nocobase.conf..."
|
|
163
|
+
sleep 1
|
|
164
|
+
done
|
|
165
|
+
|
|
166
|
+
sudo ln -sf "$(pwd)/storage/.nocobase/proxy/nginx/nocobase.conf" /etc/nginx/conf.d/nocobase.conf
|
|
167
|
+
sudo nginx -t
|
|
168
|
+
sudo systemctl reload nginx
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
If your host Nginx does not use the `conf.d` directory, replace the link target with your own config path. Usually it is safer to keep `nocobase.conf` as a file included from the `http {}` context instead of copying its content manually.
|
|
172
|
+
|
|
173
|
+
## Related links
|
|
174
|
+
|
|
175
|
+
- [Docker Installation (Built-in Nginx)](./docker.mdx) — Start with the single-container setup
|
|
176
|
+
- [Nginx Static Resource Proxy](../deployment/static-resource-proxy/nginx.md) — Learn more about the generated Nginx config
|
|
@@ -617,4 +617,97 @@ Open [http://localhost:13000](http://localhost:13000) in your browser. The initi
|
|
|
617
617
|
|
|
618
618
|
After logging in for the first time, please change the default password promptly to ensure system security.
|
|
619
619
|
|
|
620
|
-
:::
|
|
620
|
+
:::
|
|
621
|
+
|
|
622
|
+
## 5. Production deployment
|
|
623
|
+
|
|
624
|
+
If you use the built-in Nginx image, it is usually better not to expose `13000` directly to the public internet. A more common setup is to keep the container port available only on the host and let the host Nginx handle the domain, HTTPS, and reverse proxy.
|
|
625
|
+
|
|
626
|
+
### Proxy the root path with Nginx
|
|
627
|
+
|
|
628
|
+
The following config proxies domain requests to `http://127.0.0.1:13000/`:
|
|
629
|
+
|
|
630
|
+
```bash
|
|
631
|
+
server {
|
|
632
|
+
listen 80;
|
|
633
|
+
server_name your_domain.com; # Replace your_domain.com with your domain
|
|
634
|
+
|
|
635
|
+
location / {
|
|
636
|
+
proxy_pass http://127.0.0.1:13000/;
|
|
637
|
+
proxy_http_version 1.1;
|
|
638
|
+
|
|
639
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
640
|
+
proxy_set_header Connection $connection_upgrade;
|
|
641
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
642
|
+
proxy_set_header X-Forwarded-Proto $upstream_x_forwarded_proto;
|
|
643
|
+
proxy_set_header Host $final_host;
|
|
644
|
+
proxy_set_header Referer $http_referer;
|
|
645
|
+
proxy_set_header User-Agent $http_user_agent;
|
|
646
|
+
|
|
647
|
+
add_header Cache-Control "no-cache, no-store" always;
|
|
648
|
+
proxy_cache_bypass $http_upgrade;
|
|
649
|
+
|
|
650
|
+
proxy_connect_timeout 600;
|
|
651
|
+
proxy_send_timeout 600;
|
|
652
|
+
proxy_read_timeout 600;
|
|
653
|
+
send_timeout 600;
|
|
654
|
+
proxy_buffering off;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
If you also want to enable HTTPS, configure `443` and the certificate on the host Nginx. The NocoBase container does not need to handle certificates separately.
|
|
660
|
+
|
|
661
|
+
### Subpath deployment
|
|
662
|
+
|
|
663
|
+
If you want to deploy the app under a subpath, such as `https://your_domain.com/nocobase/`, configure the `APP_PUBLIC_PATH` environment variable first:
|
|
664
|
+
|
|
665
|
+
```diff
|
|
666
|
+
services:
|
|
667
|
+
app:
|
|
668
|
+
image: nocobase/nocobase:latest
|
|
669
|
+
environment:
|
|
670
|
+
+ - APP_PUBLIC_PATH=/nocobase/
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
Keep the leading and trailing `/` in the path. After this is configured, the app URL becomes `http://127.0.0.1:13000/nocobase/`.
|
|
674
|
+
|
|
675
|
+
Then configure the host Nginx with the same subpath proxy:
|
|
676
|
+
|
|
677
|
+
```bash
|
|
678
|
+
server {
|
|
679
|
+
listen 80;
|
|
680
|
+
server_name your_domain.com; # Replace your_domain.com with your domain
|
|
681
|
+
|
|
682
|
+
location /nocobase/ {
|
|
683
|
+
proxy_pass http://127.0.0.1:13000/nocobase/;
|
|
684
|
+
proxy_http_version 1.1;
|
|
685
|
+
|
|
686
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
687
|
+
proxy_set_header Connection $connection_upgrade;
|
|
688
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
689
|
+
proxy_set_header X-Forwarded-Proto $upstream_x_forwarded_proto;
|
|
690
|
+
proxy_set_header Host $final_host;
|
|
691
|
+
proxy_set_header Referer $http_referer;
|
|
692
|
+
proxy_set_header User-Agent $http_user_agent;
|
|
693
|
+
|
|
694
|
+
add_header Cache-Control "no-cache, no-store" always;
|
|
695
|
+
proxy_cache_bypass $http_upgrade;
|
|
696
|
+
|
|
697
|
+
proxy_connect_timeout 600;
|
|
698
|
+
proxy_send_timeout 600;
|
|
699
|
+
proxy_read_timeout 600;
|
|
700
|
+
send_timeout 600;
|
|
701
|
+
proxy_buffering off;
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
```
|
|
705
|
+
|
|
706
|
+
The key point is that `APP_PUBLIC_PATH` and the path in `proxy_pass` must stay consistent. If either side misses `/nocobase/`, static assets and routing will usually not work correctly.
|
|
707
|
+
|
|
708
|
+
### Other options
|
|
709
|
+
|
|
710
|
+
If you do not want to use the built-in Nginx, you can also use one of these separate proxy setups:
|
|
711
|
+
|
|
712
|
+
- [Docker Installation (External Nginx)](./docker-nginx.mdx)
|
|
713
|
+
- [Docker Installation (External Caddy)](./docker-caddy.mdx)
|
|
@@ -349,15 +349,17 @@ TELEMETRY_TRACE_PROCESSOR=console
|
|
|
349
349
|
|
|
350
350
|
### SERVER_REQUEST_WHITELIST
|
|
351
351
|
|
|
352
|
-
Whitelist of allowed targets for
|
|
352
|
+
Whitelist of allowed targets for outbound HTTP requests initiated by the NocoBase server. Accepts a comma-separated list of exact IPs, CIDR ranges, exact hostnames, and single-level wildcard subdomains.
|
|
353
353
|
|
|
354
354
|
```bash
|
|
355
|
-
SERVER_REQUEST_WHITELIST=
|
|
355
|
+
SERVER_REQUEST_WHITELIST=api.example.com,*.trusted.com,10.0.0.0/8,127.0.0.1
|
|
356
356
|
```
|
|
357
357
|
|
|
358
|
-
**Applies to**: Workflow "HTTP Request" nodes
|
|
358
|
+
**Applies to**: Workflow "HTTP Request" nodes, Custom Request action buttons, AI services, and other server-side requests. Relative-path requests (calls to the NocoBase API itself) are not affected.
|
|
359
359
|
|
|
360
|
-
**When not set**: All `http
|
|
360
|
+
**When not set**: All `http` / `https` outbound requests are allowed to keep existing behavior. However, if the target is a loopback, private, link-local, or metadata address, or if a domain resolves to one of these addresses, the server logs a warning.
|
|
361
|
+
|
|
362
|
+
**When set**: Only requests whose host matches a whitelist entry are permitted; non-matching requests will raise an error. Future versions may gradually tighten the default behavior. If your deployment needs to access internal services, configure an explicit whitelist in advance.
|
|
361
363
|
|
|
362
364
|
Supported formats:
|
|
363
365
|
|
|
@@ -365,9 +367,17 @@ Supported formats:
|
|
|
365
367
|
| --- | --- | --- |
|
|
366
368
|
| Exact IPv4 | `1.2.3.4` | That IP only |
|
|
367
369
|
| IPv4 CIDR | `10.0.0.0/8` | All IPs in the subnet |
|
|
370
|
+
| Exact IPv6 | `::1` | That IP only |
|
|
371
|
+
| IPv6 CIDR | `fc00::/7` | All IPs in the subnet |
|
|
368
372
|
| Exact hostname | `api.example.com` | That hostname only |
|
|
369
373
|
| Wildcard subdomain | `*.example.com` | One subdomain level, e.g. `foo.example.com`; does **not** match `example.com` or `a.b.example.com` |
|
|
370
374
|
|
|
375
|
+
:::warning Note
|
|
376
|
+
|
|
377
|
+
If a domain is configured in the whitelist, the whitelist check uses the host in the request URL. In other words, after `internal.example.com` is configured, it is treated as explicitly allowed even if the domain resolves to `127.0.0.1` or a private address.
|
|
378
|
+
|
|
379
|
+
:::
|
|
380
|
+
|
|
371
381
|
## Experimental Environment Variables
|
|
372
382
|
|
|
373
383
|
### APPEND_PRESET_LOCAL_PLUGINS
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
pkg: '@nocobase/plugin-version-control'
|
|
2
3
|
title: "Version control"
|
|
3
4
|
description: "Version control plugin guide: automatically save versions during AI Builder sessions, create and restore versions manually, configure retention, set shortcuts, and include user collections in saved versions."
|
|
4
5
|
keywords: "Version control,ops management,AI Builder,nocobase-revision,nb revision create,create version,restore version,NocoBase"
|