Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0d40d43

Browse files
authored
Merge pull requestlowcoder-org#641 from lowcoder-org/env-variables-cleanup
Env variables cleanup
2 parentsdda2b04 +27ca2d4 commit0d40d43

File tree

18 files changed

+165
-149
lines changed

18 files changed

+165
-149
lines changed

‎app.json‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@
2020
}
2121
},
2222
"env": {
23-
"ENCRYPTION_PASSWORD": {
23+
"LOWCODER_DB_ENCRYPTION_PASSWORD": {
2424
"description":"The encryption password used to encrypt all sensitive credentials in the database. You can use any random string (eg abcd).",
2525
"required":false
2626
},
27-
"ENCRYPTION_SALT": {
27+
"LOWCODER_DB_ENCRYPTION_SALT": {
2828
"description":"The encryption salt used to encrypt all sensitive credentials in the database. You can use any random string (eg abcd).",
2929
"required":false
3030
},
31-
"CORS_ALLOWED_DOMAINS": {
31+
"LOWCODER_CORS_DOMAINS": {
3232
"description":"The domains supported for CORS requests. All domains are allowed by default. If there are multiple domains, please separate them with commas.",
3333
"required":false
3434
},
35-
"MONGODB_URL": {
35+
"LOWCODER_MONGODB_URL": {
3636
"description":"Your Mongo Database URL.",
3737
"required":false
3838
},
39-
"REDIS_URL": {
39+
"LOWCODER_REDIS_URL": {
4040
"description":"Your Redis Database URL.",
4141
"required":false
4242
}

‎deploy/docker/Dockerfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ COPY --chown=lowcoder:lowcoder deploy/docker/all-in-one/etc /lowcoder/etc
212212
# Add startup script
213213
COPY --chown=lowcoder:lowcoder deploy/docker/all-in-one/entrypoint.sh /lowcoder/entrypoint.sh
214214

215+
EXPOSE 27017
215216
EXPOSE 3000
216217
EXPOSE 3443
217218

‎deploy/docker/README.md‎

Lines changed: 39 additions & 40 deletions
Large diffs are not rendered by default.

‎deploy/docker/all-in-one/entrypoint.sh‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
set -e
44

5-
export USER_ID=${PUID:=9001}
6-
export GROUP_ID=${PGID:=9001}
5+
export USER_ID=${LOWCODER_PUID:=9001}
6+
export GROUP_ID=${LOWCODER_PGID:=9001}
77

88
# Update ID of lowcoder user if required
99
if [!`id --user lowcoder`-eq${USER_ID} ];then
@@ -17,6 +17,14 @@ if [ ! `id --group lowcoder` -eq ${GROUP_ID} ]; then
1717
echo"ID for lowcoder group changed to:${GROUP_ID}"
1818
fi;
1919

20+
# Update host on which mongo is supposed to listen
21+
# If LOWCODER_MONGODB_EXPOSED is true, it will isten on all interfaces
22+
if ["${LOWCODER_MONGODB_EXPOSED}"="true" ];then
23+
export MONGO_LISTEN_HOST="0.0.0.0"
24+
else
25+
export MONGO_LISTEN_HOST="127.0.0.1"
26+
fi;
27+
2028
LOGS="/lowcoder-stacks/logs"
2129
DATA="/lowcoder-stacks/data"
2230
CERT="/lowcoder-stacks/ssl"
@@ -44,27 +52,27 @@ mkdir -p ${SUPERVISOR_ENABLED}
4452
rm -f${SUPERVISOR_ENABLED}/*.conf
4553

4654
# Enable redis if configured to run
47-
if ["${REDIS_ENABLED:=true}"="true" ];then
55+
if ["${LOWCODER_REDIS_ENABLED:=true}"="true" ];then
4856
ln${SUPERVISOR_AVAILABLE}/01-redis.conf${SUPERVISOR_ENABLED}/01-redis.conf
4957
fi;
5058

5159
# Enable mongodb if configured to run
52-
if ["${MONGODB_ENABLED:=true}"="true" ];then
60+
if ["${LOWCODER_MONGODB_ENABLED:=true}"="true" ];then
5361
ln${SUPERVISOR_AVAILABLE}/02-mongodb.conf${SUPERVISOR_ENABLED}/02-mongodb.conf
5462
fi;
5563

5664
# Enable api-service if configured to run
57-
if ["${API_SERVICE_ENABLED:=true}"="true" ];then
65+
if ["${LOWCODER_API_SERVICE_ENABLED:=true}"="true" ];then
5866
ln${SUPERVISOR_AVAILABLE}/10-api-service.conf${SUPERVISOR_ENABLED}/10-api-service.conf
5967
fi;
6068

6169
# Enable node-service if configured to run
62-
if ["${NODE_SERVICE_ENABLED:=true}"="true" ];then
70+
if ["${LOWCODER_NODE_SERVICE_ENABLED:=true}"="true" ];then
6371
ln${SUPERVISOR_AVAILABLE}/11-node-service.conf${SUPERVISOR_ENABLED}/11-node-service.conf
6472
fi;
6573

6674
# Enable frontend if configured to run
67-
if ["${FRONTEND_ENABLED:=true}"="true" ];then
75+
if ["${LOWCODER_FRONTEND_ENABLED:=true}"="true" ];then
6876
ln${SUPERVISOR_AVAILABLE}/20-frontend.conf${SUPERVISOR_ENABLED}/20-frontend.conf
6977
fi;
7078

‎deploy/docker/all-in-one/etc/supervisord/conf-available/02-mongodb.conf‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[program:mongodb]
22
user=lowcoder
33
directory=/lowcoder-stacks/data/mongodb
4-
command=mongod --port 27017 --dbpath /lowcoder-stacks/data/mongodb --logpath log --bind_iplocalhost
4+
command=mongod --port 27017 --dbpath /lowcoder-stacks/data/mongodb --logpath log --bind_ip%(ENV_MONGO_LISTEN_HOST)s
55
priority=10
66
autostart=true
77
autorestart=true

‎deploy/docker/api-service/entrypoint.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
set -e
44

5-
export USER_ID="${PUID:=9001}"
6-
export GROUP_ID="${PGID:=9001}"
5+
export USER_ID="${LOWCODER_PUID:=9001}"
6+
export GROUP_ID="${LOWCODER_PGID:=9001}"
77

88
# Run init script
99
echo"Initializing api-service..."

‎deploy/docker/docker-compose-multi.yaml‎

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,35 @@ services:
3131
# ports:
3232
# - "8080:8080"
3333
environment:
34-
PUID:"9001"
35-
PGID:"9001"
36-
MONGODB_URL:"mongodb://lowcoder:secret123@mongodb/lowcoder?authSource=admin"
37-
REDIS_URL:"redis://redis:6379"
34+
LOWCODER_PUID:"9001"
35+
LOWCODER_PGID:"9001"
36+
LOWCODER_MONGODB_URL:"mongodb://lowcoder:secret123@mongodb/lowcoder?authSource=admin"
37+
LOWCODER_REDIS_URL:"redis://redis:6379"
3838
LOWCODER_NODE_SERVICE_URL:"http://lowcoder-node-service:6060"
3939
LOWCODER_MAX_QUERY_TIMEOUT:120
40-
ENABLE_USER_SIGN_UP:"true"
40+
LOWCODER_EMAIL_AUTH_ENABLED:"true"
41+
LOWCODER_EMAIL_SIGNUP_ENABLED:"true"
42+
LOWCODER_CREATE_WORKSPACE_ON_SIGNUP:"true"
4143
#
4244
# ! PLEASE CHANGE THESE TO SOMETHING UNIQUE !
4345
#
44-
#ENCRYPTION_PASSWORD andENCRYPTION_SALT is used to encrypt sensitive
45-
# data in database so it is important to change the defaults
46+
#LOWCODER_DB_ENCRYPTION_PASSWORD andLOWCODER_DB_ENCRYPTION_SALT is used
47+
#to encrypt sensitivedata in database so it is important to change the defaults
4648
#
47-
ENCRYPTION_PASSWORD:"lowcoder.org"
48-
ENCRYPTION_SALT:"lowcoder.org"
49-
CORS_ALLOWED_DOMAINS:"*"
50-
DEFAULT_ORGS_PER_USER:100
51-
DEFAULT_ORG_MEMBER_COUNT:1000
52-
DEFAULT_ORG_GROUP_COUNT:100
53-
DEFAULT_ORG_APP_COUNT:1000
54-
DEFAULT_DEVELOPER_COUNT:50
49+
LOWCODER_DB_ENCRYPTION_PASSWORD:"lowcoder.org"
50+
LOWCODER_DB_ENCRYPTION_SALT:"lowcoder.org"
51+
LOWCODER_CORS_DOMAINS:"*"
52+
LOWCODER_MAX_ORGS_PER_USER:100
53+
LOWCODER_MAX_MEMBERS_PER_ORG:1000
54+
LOWCODER_MAX_GROUPS_PER_ORG:100
55+
LOWCODER_MAX_APPS_PER_ORG:1000
56+
LOWCODER_MAX_DEVELOPERS:50
5557
#
5658
# API-KEY secret - should be a string of at least 32 random characters
5759
# - on linux/mac, generate one eg. with: head /dev/urandom | head -c 30 | shasum -a 256
5860
#
5961
LOWCODER_API_KEY_SECRET:"5a41b090758b39b226603177ef48d73ae9839dd458ccb7e66f7e7cc028d5a50b"
60-
COMMON_WORKSPACE_MODE:SAAS
62+
LOWCODER_WORKSPACE_MODE:SAAS
6163
restart:unless-stopped
6264
depends_on:
6365
-mongodb
@@ -70,8 +72,8 @@ services:
7072
# ports:
7173
# - "6060:6060"
7274
environment:
73-
PUID:"9001"
74-
PGID:"9001"
75+
LOWCODER_PUID:"9001"
76+
LOWCODER_PGID:"9001"
7577
LOWCODER_API_SERVICE_URL:"http://lowcoder-api-service:8080"
7678
restart:unless-stopped
7779
depends_on:
@@ -86,8 +88,8 @@ services:
8688
ports:
8789
-"3000:3000"
8890
environment:
89-
PUID:"9001"
90-
PGID:"9001"
91+
LOWCODER_PUID:"9001"
92+
LOWCODER_PGID:"9001"
9193
LOWCODER_MAX_REQUEST_SIZE:20m
9294
LOWCODER_MAX_QUERY_TIMEOUT:120
9395
LOWCODER_API_SERVICE_URL:"http://lowcoder-api-service:8080"

‎deploy/docker/docker-compose.yaml‎

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,43 @@ services:
1010
ports:
1111
-"3000:3000"
1212
-"3443:3443"
13+
# - "27017:27017"
1314
environment:
1415
# enable services
15-
REDIS_ENABLED:"true"
16-
MONGODB_ENABLED:"true"
17-
API_SERVICE_ENABLED:"true"
18-
NODE_SERVICE_ENABLED:"true"
19-
FRONTEND_ENABLED:"true"
16+
LOWCODER_REDIS_ENABLED:"true"
17+
LOWCODER_MONGODB_ENABLED:"true"
18+
#
19+
# Set LOWCODER_MONGODB_EXPOSED to "true" and uncomment mongodb port
20+
# to make internal mongo database accessible from host
21+
#
22+
LOWCODER_MONGODB_EXPOSED:"false"
23+
LOWCODER_API_SERVICE_ENABLED:"true"
24+
LOWCODER_NODE_SERVICE_ENABLED:"true"
25+
LOWCODER_FRONTEND_ENABLED:"true"
2026
# generic parameters
21-
PUID:"1000"
22-
PGID:"1000"
27+
LOWCODER_PUID:"1000"
28+
LOWCODER_PGID:"1000"
2329
# api-service parameters
24-
DEFAULT_ORGS_PER_USER:100
25-
DEFAULT_ORG_MEMBER_COUNT:1000
26-
DEFAULT_ORG_GROUP_COUNT:100
27-
DEFAULT_ORG_APP_COUNT:1000
28-
DEFAULT_DEVELOPER_COUNT:50
29-
#MONGODB_URL: "mongodb://lowcoder:secret123@mongodb/lowcoder?authSource=admin"
30-
MONGODB_URL:"mongodb://localhost:27017/lowcoder?authSource=admin"
31-
REDIS_URL:"redis://localhost:6379"
32-
ENABLE_USER_SIGN_UP:"true"
30+
LOWCODER_MAX_ORGS_PER_USER:100
31+
LOWCODER_MAX_MEMBERS_PER_ORG:1000
32+
LOWCODER_MAX_GROUPS_PER_ORG:100
33+
LOWCODER_MAX_APPS_PER_ORG:1000
34+
LOWCODER_MAX_DEVELOPERS:50
35+
#LOWCODER_MONGODB_URL: "mongodb://lowcoder:secret123@mongodb/lowcoder?authSource=admin"
36+
LOWCODER_MONGODB_URL:"mongodb://localhost:27017/lowcoder?authSource=admin"
37+
LOWCODER_REDIS_URL:"redis://localhost:6379"
38+
LOWCODER_EMAIL_SIGNUP_ENABLED:"true"
39+
LOWCODER_EMAIL_AUTH_ENABLED:"true"
40+
LOWCODER_CREATE_WORKSPACE_ON_SIGNUP:"true"
3341
#
3442
# ! PLEASE CHANGE THESE TO SOMETHING UNIQUE !
3543
#
36-
#ENCRYPTION_PASSWORD andENCRYPTION_SALT is used to encrypt sensitive
37-
# data in database so it is important to change the defaults
44+
#LOWCODER_DB_ENCRYPTION_PASSWORD andLOWCODER_DB_ENCRYPTION_SALT is used
45+
#to encrypt sensitivedata in database so it is important to change the defaults
3846
#
39-
ENCRYPTION_PASSWORD:"lowcoder.org"
40-
ENCRYPTION_SALT:"lowcoder.org"
41-
CORS_ALLOWED_DOMAINS:"*"
47+
LOWCODER_DB_ENCRYPTION_PASSWORD:"lowcoder.org"
48+
LOWCODER_DB_ENCRYPTION_SALT:"lowcoder.org"
49+
LOWCODER_CORS_DOMAINS:"*"
4250
#
4351
# API-KEY secret - should be a string of at least 32 random characters
4452
# - on linux/mac, generate one eg. with: head /dev/urandom | head -c 30 | shasum -a 256
@@ -50,7 +58,7 @@ services:
5058
# frontend parameters
5159
LOWCODER_MAX_REQUEST_SIZE:20m
5260
LOWCODER_MAX_QUERY_TIMEOUT:120
53-
COMMON_WORKSPACE_MODE:SAAS
61+
LOWCODER_WORKSPACE_MODE:SAAS
5462
volumes:
5563
-./lowcoder-stacks:/lowcoder-stacks
5664
-./lowcoder-stacks/assets:/lowcoder/assets

‎deploy/docker/frontend/00-change-nginx-user.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
set -e
44

5-
USER_ID=${PUID:=9001}
6-
GROUP_ID=${PGID:=9001}
5+
USER_ID=${LOWCODER_PUID:=9001}
6+
GROUP_ID=${LOWCODER_PGID:=9001}
77
CLIENT_ROOT=/lowcoder/client
88

99
# Update ID of lowcoder user if required

‎deploy/docker/node-service/entrypoint.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
set -e
44

5-
export USER_ID=${PUID:=9001}
6-
export GROUP_ID=${PGID:=9001}
5+
export USER_ID=${LOWCODER_PUID:=9001}
6+
export GROUP_ID=${LOWCODER_PGID:=9001}
77
export API_HOST="${LOWCODER_API_SERVICE_URL:=http://localhost:8080}"
88

99
# Run init script

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp