Skip to content

Commit

Permalink
feat: STEEDOS_NODERED_ENABLED=true 时才启动内置 node-red
Browse files Browse the repository at this point in the history
  • Loading branch information
hotlong committed Jan 6, 2025
1 parent 15a465c commit 4e39b4c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions deploy/enterprise/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ services:
- B6_PLUGIN_PACKAGES=@builder6/node-red,lodash
- B6_PLUGIN_SERVICES=@builder6/node-red
- B6_PLUGIN_MODULES=@builder6/node-red
- STEEDOS_NODERED_ENABLED=true
# - B6_OIDC_ENABLED=false
# - B6_OIDC_ISSUER=https://id.steedos.cn/realms/master
# - B6_OIDC_CLIENT_ID=steedos-oidc-public
Expand Down
4 changes: 4 additions & 0 deletions deploy/enterprise/fs/opt/steedos/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ init_env_file() {
export STEEDOS_UNPKG_ENABLED=false
fi

if [ -z "${STEEDOS_NODERED_ENABLED}" ]; then
export STEEDOS_NODERED_ENABLED=false
fi


# Build an env file with current env variables. We single-quote the values, as well as escaping any single-quote characters.
printenv | grep -E '^STEEDOS_|^B6_|^MONGO_|ROOT_URL|CACHER|TRANSPORTER|PORT|NODE_ENV' | sed "s/'/'\\\''/g; s/=/='/; s/$/'/" > "$CONF_PATH/pre-define.env"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
directory=/opt/steedos/nodered/
command=/opt/steedos/run-with-env.sh ./node_modules/.bin/node-red --settings settings.js
priority=15
autostart=true
autorestart=true
autostart=%(ENV_STEEDOS_NODERED_ENABLED)s
autorestart=%(ENV_STEEDOS_NODERED_ENABLED)s
startsecs=0
startretries=3
stdout_logfile=/steedos-storage/logs/%(program_name)s/%(program_name)s-%(ENV_HOSTNAME)s.log
Expand Down

0 comments on commit 4e39b4c

Please sign in to comment.