diff --git a/app.json b/app.json
index c5508ec4e..0889503a9 100644
--- a/app.json
+++ b/app.json
@@ -27,8 +27,8 @@
"description": "The domains supported for CORS requests. All domains are allowed by default. If there are multiple domains, please separate them with commas.",
"required": false
},
- "MONGODB_URI": {
- "description": "Your Mongo Database URI.",
+ "MONGODB_URL": {
+ "description": "Your Mongo Database URL.",
"required": false
},
"REDIS_URL": {
diff --git a/deploy/docker/README.md b/deploy/docker/README.md
index 6e29eb483..24252ee9e 100644
--- a/deploy/docker/README.md
+++ b/deploy/docker/README.md
@@ -21,24 +21,28 @@ DOCKER_BUILDKIT=1 docker build -f deploy/docker/Dockerfile -t lowcoderorg/lowcod
Image can be configured by setting environment variables.
-| Environment variable | Description | Value |
-| --------------------------------| --------------------------------------------------------------------| ------------------------------------------------------- |
-| `REDIS_ENABLED` | If **true** redis server is started in the container | `true` |
-| `MONGODB_ENABLED` | If **true** mongo database is started in the container | `true` |
-| `API_SERVICE_ENABLED` | If **true** lowcoder api-service is started in the container | `true` |
-| `NODE_SERVICE_ENABLED` | If **true** lowcoder node-service is started in the container | `true` |
-| `FRONTEND_ENABLED` | If **true** lowcoder web frontend is started in the container | `true` |
-| `PUID` | ID of user running services. It will own all created logs and data. | `9001` |
-| `PGID` | ID of group of the user running services. | `9001` |
-| `MONGODB_URI` | Mongo database connection string | `mongodb://localhost:27017/lowcoder?authSource=admin` |
-| `REDIS_URL` | Redis server URL | `redis://localhost:6379` |
-| `JS_EXECUTOR_URI` | Node service URL | `http://localhost:6060` |
-| `ENABLE_USER_SIGN_UP` | Enable registration of new users | `true` |
+| Environment variable | Description | Value |
+| --------------------------------| --------------------------------------------------------------------| ----------------------------------------------------- |
+| `REDIS_ENABLED` | If **true** redis server is started in the container | `true` |
+| `MONGODB_ENABLED` | If **true** mongo database is started in the container | `true` |
+| `API_SERVICE_ENABLED` | If **true** lowcoder api-service is started in the container | `true` |
+| `NODE_SERVICE_ENABLED` | If **true** lowcoder node-service is started in the container | `true` |
+| `FRONTEND_ENABLED` | If **true** lowcoder web frontend is started in the container | `true` |
+| `PUID` | ID of user running services. It will own all created logs and data. | `9001` |
+| `PGID` | ID of group of the user running services. | `9001` |
+| `MONGODB_URL` | Mongo database connection string | `mongodb://localhost:27017/lowcoder?authSource=admin` |
+| `REDIS_URL` | Redis server URL | `redis://localhost:6379` |
+| `ENABLE_USER_SIGN_UP` | Enable registration of new users | `true` |
| `ENCRYPTION_PASSWORD` | Encryption password | `lowcoder.org` |
| `ENCRYPTION_SALT` | Salt used for encrypting password | `lowcoder.org` |
-| `CORS_ALLOWED_DOMAINS` | CORS allowed domains | `*` |
-| `LOWCODER_API_SERVICE_URL` | Lowcoder API service URL | `http://localhost:8080` |
-| `LOWCODER_NODE_SERVICE_URL` | Lowcoder Node service (js executor) URL | `http://localhost:6060` |
+| `CORS_ALLOWED_DOMAINS` | CORS allowed domains | `*` |
+| `LOWCODER_API_SERVICE_URL` | Lowcoder API service URL | `http://localhost:8080` |
+| `LOWCODER_NODE_SERVICE_URL` | Lowcoder Node service (js executor) URL | `http://localhost:6060` |
+| `DEFAULT_ORGS_PER_USER` | Default maximum organizations per user | `100` |
+| `DEFAULT_ORG_MEMBER_COUNT` | Default maximum members per organization | `1000` |
+| `DEFAULT_ORG_GROUP_COUNT` | Default maximum groups per organization | `100` |
+| `DEFAULT_ORG_APP_COUNT` | Default maximum applications per organization | `1000` |
+| `DEFAULT_DEVELOPER_COUNT` | Default maximum developers | `100` |
## Building api-service image
@@ -57,17 +61,22 @@ DOCKER_BUILDKIT=1 docker build -f deploy/docker/Dockerfile -t lowcoderorg/lowcod
Image can be configured by setting environment variables.
-| Environment variable | Description | Value |
-| --------------------------------| --------------------------------------------------------------------| ------------------------------------------------------- |
-| `PUID` | ID of user running services. It will own all created logs and data. | `9001` |
-| `PGID` | ID of group of the user running services. | `9001` |
-| `MONGODB_URI` | Mongo database connection string | `mongodb://localhost:27017/lowcoder?authSource=admin` |
-| `REDIS_URL` | Redis server URL | `redis://localhost:6379` |
-| `JS_EXECUTOR_URI` | Node service URL | `http://localhost:6060` |
-| `ENABLE_USER_SIGN_UP` | Enable registration of new users | `true` |
+| Environment variable | Description | Value |
+| --------------------------------| --------------------------------------------------------------------| ------------------------------------------------------|
+| `PUID` | ID of user running services. It will own all created logs and data. | `9001` |
+| `PGID` | ID of group of the user running services. | `9001` |
+| `MONGODB_URL` | Mongo database connection string | `mongodb://localhost:27017/lowcoder?authSource=admin` |
+| `REDIS_URL` | Redis server URL | `redis://localhost:6379` |
+| `ENABLE_USER_SIGN_UP` | Enable registration of new users | `true` |
| `ENCRYPTION_PASSWORD` | Encryption password | `lowcoder.org` |
| `ENCRYPTION_SALT` | Salt used for encrypting password | `lowcoder.org` |
-| `CORS_ALLOWED_DOMAINS` | CORS allowed domains | `*` |
+| `CORS_ALLOWED_DOMAINS` | CORS allowed domains | `*` |
+| `DEFAULT_ORGS_PER_USER` | Default maximum organizations per user | `100` |
+| `DEFAULT_ORG_MEMBER_COUNT` | Default maximum members per organization | `1000` |
+| `DEFAULT_ORG_GROUP_COUNT` | Default maximum groups per organization | `100` |
+| `DEFAULT_ORG_APP_COUNT` | Default maximum applications per organization | `1000` |
+| `DEFAULT_DEVELOPER_COUNT` | Default maximum developers | `100` |
+
## Building node-service image
@@ -90,7 +99,7 @@ Image can be configured by setting environment variables.
| --------------------------------| --------------------------------------------------------------------| ------------------------------------------------------- |
| `PUID` | ID of user running services. It will own all created logs and data. | `9001` |
| `PGID` | ID of group of the user running services. | `9001` |
-| `LOWCODER_API_SERVICE_URL` | Lowcoder API service URL | `http://localhost:8080` |
+| `LOWCODER_API_SERVICE_URL` | Lowcoder API service URL | `http://localhost:8080` |
## Building web frontend image
@@ -112,7 +121,7 @@ Image can be configured by setting environment variables.
| --------------------------------| --------------------------------------------------------------------| ------------------------------------------------------- |
| `PUID` | ID of user running services. It will own all created logs and data. | `9001` |
| `PGID` | ID of group of the user running services. | `9001` |
-| `LOWCODER_API_SERVICE_URL` | Lowcoder API service URL | `http://localhost:8080` |
-| `LOWCODER_NODE_SERVICE_URL` | Lowcoder Node service (js executor) URL | `http://localhost:6060` |
+| `LOWCODER_API_SERVICE_URL` | Lowcoder API service URL | `http://localhost:8080` |
+| `LOWCODER_NODE_SERVICE_URL` | Lowcoder Node service (js executor) URL | `http://localhost:6060` |
diff --git a/deploy/docker/docker-compose-multi.yaml b/deploy/docker/docker-compose-multi.yaml
index 702063065..5bfd50d0f 100644
--- a/deploy/docker/docker-compose-multi.yaml
+++ b/deploy/docker/docker-compose-multi.yaml
@@ -33,13 +33,18 @@ services:
environment:
PUID: "9001"
PGID: "9001"
- MONGODB_URI: "mongodb://lowcoder:secret123@mongodb/lowcoder?authSource=admin"
+ MONGODB_URL: "mongodb://lowcoder:secret123@mongodb/lowcoder?authSource=admin"
REDIS_URL: "redis://redis:6379"
- JS_EXECUTOR_URI: "http://lowcoder-node-service:6060"
+ LOWCODER_NODE_SERVICE_URL: "http://lowcoder-node-service:6060"
ENABLE_USER_SIGN_UP: "true"
ENCRYPTION_PASSWORD: "lowcoder.org"
ENCRYPTION_SALT: "lowcoder.org"
CORS_ALLOWED_DOMAINS: "*"
+ DEFAULT_ORGS_PER_USER: 100
+ DEFAULT_ORG_MEMBER_COUNT: 1000
+ DEFAULT_ORG_GROUP_COUNT: 100
+ DEFAULT_ORG_APP_COUNT: 1000
+ DEFAULT_DEVELOPER_COUNT: 50
restart: unless-stopped
depends_on:
- mongodb
diff --git a/deploy/docker/docker-compose.yaml b/deploy/docker/docker-compose.yaml
index 6b3e7ef0a..3ed3639ee 100644
--- a/deploy/docker/docker-compose.yaml
+++ b/deploy/docker/docker-compose.yaml
@@ -20,10 +20,14 @@ services:
PUID: "1000"
PGID: "1000"
# api-service parameters
- #MONGODB_URI: "mongodb://lowcoder:secret123@mongodb/lowcoder?authSource=admin"
- MONGODB_URI: "mongodb://localhost:27017/lowcoder?authSource=admin"
+ DEFAULT_ORGS_PER_USER: 100
+ DEFAULT_ORG_MEMBER_COUNT: 1000
+ DEFAULT_ORG_GROUP_COUNT: 100
+ DEFAULT_ORG_APP_COUNT: 1000
+ DEFAULT_DEVELOPER_COUNT: 50
+ #MONGODB_URL: "mongodb://lowcoder:secret123@mongodb/lowcoder?authSource=admin"
+ MONGODB_URL: "mongodb://localhost:27017/lowcoder?authSource=admin"
REDIS_URL: "redis://localhost:6379"
- JS_EXECUTOR_URI: "http://localhost:6060"
ENABLE_USER_SIGN_UP: "true"
ENCRYPTION_PASSWORD: "lowcoder.org"
ENCRYPTION_SALT: "lowcoder.org"
diff --git a/deploy/helm/templates/api-service/configMap.yaml b/deploy/helm/templates/api-service/configMap.yaml
index 2d9abad8a..ae09a821a 100644
--- a/deploy/helm/templates/api-service/configMap.yaml
+++ b/deploy/helm/templates/api-service/configMap.yaml
@@ -18,9 +18,9 @@ data:
REDIS_URL: {{- .Values.redis.externalUrl | quote }}
{{- end }}
{{- if .Values.apiService.nodeServiceUrl }}
- JS_EXECUTOR_URI: {{ .Values.apiService.nodeServiceUrl | quote }}
+ LOWCODER_NODE_SERVICE_URL: {{ .Values.apiService.nodeServiceUrl | quote }}
{{- else }}
- JS_EXECUTOR_URI: "http://{{ $name }}-node-service:{{ .Values.nodeService.service.port }}"
+ LOWCODER_NODE_SERVICE_URL: "http://{{ $name }}-node-service:{{ .Values.nodeService.service.port }}"
{{- end }}
PUID: {{ .Values.apiService.config.userId | default "9001" | quote }}
PGID: {{ .Values.apiService.config.groupId | default "9001" | quote }}
diff --git a/deploy/helm/templates/api-service/secrets.yaml b/deploy/helm/templates/api-service/secrets.yaml
index 64aa009e9..7f6752f66 100644
--- a/deploy/helm/templates/api-service/secrets.yaml
+++ b/deploy/helm/templates/api-service/secrets.yaml
@@ -16,9 +16,9 @@ metadata:
{{- end }}
stringData:
{{- if .Values.mongodb.enabled }}
- MONGODB_URI: "mongodb://{{ $mongoUser }}:{{ $mongoPassword }}@{{ $mongoServicename }}.{{ $nameSpace }}.svc.cluster.local/{{ $lowcoderDatabase }}?retryWrites=true&ssl=false"
+ MONGODB_URL: "mongodb://{{ $mongoUser }}:{{ $mongoPassword }}@{{ $mongoServicename }}.{{ $nameSpace }}.svc.cluster.local/{{ $lowcoderDatabase }}?retryWrites=true&ssl=false"
{{- else }}
- MONGODB_URI: {{- .Values.mongodb.externalUrl | quote }}
+ MONGODB_URL: {{- .Values.mongodb.externalUrl | quote }}
{{- end }}
ENCRYPTION_PASSWORD: {{ .Values.apiService.config.encryption.password | default "lowcoder.org" | quote }}
ENCRYPTION_SALT: {{ .Values.apiService.config.encryption.salt | default "lowcoder.org" | quote }}
diff --git a/docs/self-hosting/README.md b/docs/self-hosting/README.md
index 3c1676290..8f76e22f5 100644
--- a/docs/self-hosting/README.md
+++ b/docs/self-hosting/README.md
@@ -136,8 +136,8 @@ For developers who require stateless containers in a cluster environment, we off
- * **mongodb**: Start a new MongoDB instance on your host. You can delete this part and modify the environment variable `MONGODB_URI` of **openblocks-api-service** to use your own MongoDB.
- * **redis**: Start a new Redis instance on your host. You can delete this part and modify the environment variable `REDIS_URI` of **openblocks-api-service** to use your own Redis.
+ * **mongodb**: Start a new MongoDB instance on your host. You can delete this part and modify the environment variable `MONGODB_URL` of **openblocks-api-service** to use your own MongoDB.
+ * **redis**: Start a new Redis instance on your host. You can delete this part and modify the environment variable `REDIS_URL` of **openblocks-api-service** to use your own Redis.
* **openblocks-api-service**: Required.
* **openblocks-node-service**: Required.
* **openblocks-frontend**: Required. Can be optional if you deploy frontend on CDN.
@@ -199,16 +199,16 @@ By default Lowcoder uses the built-in MongoDB and Redis installed inside the con
{% tabs %}
{% tab title="Docker-Compose" %}
-Add environment variables `MONGODB_URI` and `REDIS_URI` in `docker-compose.yml` downloaded in your working directory.\
+Add environment variables `MONGODB_URL` and `REDIS_URL` in `docker-compose.yml` downloaded in your working directory.\
{% endtab %}
{% tab title="Docker" %}
-Add environment variables `MONGODB_URI` and `REDIS_URI` to the deployment command, as shown below:
+Add environment variables `MONGODB_URL` and `REDIS_URL` to the deployment command, as shown below:
{% code overflow="wrap" %}
```bash
-docker run -d --name openblocks -e MONGODB_URI=YOUR_MONGODB_URI REDIS_URI=YOUR_REDIS_URI -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks lowcoderorg/lowcoder-ce
+docker run -d --name openblocks -e MONGODB_URL=YOUR_MONGODB_URL REDIS_URL=YOUR_REDIS_URL -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks lowcoderorg/lowcoder-ce
```
{% endcode %}
{% endtab %}
diff --git a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/query/service/QueryExecutionService.java b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/query/service/QueryExecutionService.java
index 78a464fcb..86f981af7 100644
--- a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/query/service/QueryExecutionService.java
+++ b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/query/service/QueryExecutionService.java
@@ -47,7 +47,7 @@ public Mono executeQuery(Datasource datasource, Map {
if (datasourceMetaInfoService.isJsDatasourcePlugin(datasource.getType())) {
- return executeByNodeJs(datasource, queryConfig, requestParams);
+ return executeByNodeJs(datasource, queryConfig, requestParams, queryVisitorContext);
}
return executeLocally(datasource, queryConfig, requestParams, queryVisitorContext);
})
@@ -77,11 +77,19 @@ private Mono executeLocally(Datasource datasource, Map executeByNodeJs(Datasource datasource, Map queryConfig, Map requestParams) {
+ private Mono executeByNodeJs(Datasource datasource, Map queryConfig, Map requestParams, QueryVisitorContext queryVisitorContext) {
List